You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/11/17 03:29:50 UTC

[2/3] mesos git commit: Fixed `operator<<` parameter naming in stout.

Fixed `operator<<` parameter naming in stout.

By convention, we use `stream` for the first parameter to ostream
`operator<<` implementations.

Review: https://reviews.apache.org/r/53548/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9f50f1ad
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9f50f1ad
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9f50f1ad

Branch: refs/heads/master
Commit: 9f50f1ad93a6eafef273d5348e7eeb88f1636654
Parents: 33f621b
Author: Neil Conway <ne...@gmail.com>
Authored: Wed Nov 16 16:36:27 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Wed Nov 16 16:36:44 2016 -0800

----------------------------------------------------------------------
 3rdparty/stout/include/stout/proc.hpp    |  8 ++++----
 3rdparty/stout/include/stout/version.hpp | 12 +++++++++---
 2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9f50f1ad/3rdparty/stout/include/stout/proc.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/proc.hpp b/3rdparty/stout/include/stout/proc.hpp
index dd0d623..abcbf7c 100644
--- a/3rdparty/stout/include/stout/proc.hpp
+++ b/3rdparty/stout/include/stout/proc.hpp
@@ -424,11 +424,11 @@ inline bool operator<(const CPU& lhs, const CPU& rhs)
 }
 
 
-inline std::ostream& operator<<(std::ostream& out, const CPU& cpu)
+inline std::ostream& operator<<(std::ostream& stream, const CPU& cpu)
 {
-  return out << "CPU (id:" << cpu.id << ", "
-             << "core:" << cpu.core << ", "
-             << "socket:" << cpu.socket << ")";
+  return stream << "CPU (id:" << cpu.id << ", "
+                << "core:" << cpu.core << ", "
+                << "socket:" << cpu.socket << ")";
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/9f50f1ad/3rdparty/stout/include/stout/version.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/version.hpp b/3rdparty/stout/include/stout/version.hpp
index 5ae1c73..7717c85 100644
--- a/3rdparty/stout/include/stout/version.hpp
+++ b/3rdparty/stout/include/stout/version.hpp
@@ -121,7 +121,9 @@ struct Version
     return *this > other || *this == other;
   }
 
-  friend inline std::ostream& operator<<(std::ostream& s, const Version& v);
+  friend inline std::ostream& operator<<(
+      std::ostream& stream,
+      const Version& version);
 
   const int majorVersion;
   const int minorVersion;
@@ -129,9 +131,13 @@ struct Version
 };
 
 
-inline std::ostream& operator<<(std::ostream& s, const Version& v)
+inline std::ostream& operator<<(
+    std::ostream& stream,
+    const Version& version)
 {
-  return s << v.majorVersion << "." << v.minorVersion << "." << v.patchVersion;
+  return stream << version.majorVersion << "."
+                << version.minorVersion << "."
+                << version.patchVersion;
 }
 
 #endif // __STOUT_VERSION_HPP__