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:51 UTC

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

Fixed `operator<<` parameter naming in mesos.

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

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


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

Branch: refs/heads/master
Commit: e76e8699574384feafaa8438ae3766b2cda9ff7e
Parents: a15cc82
Author: Neil Conway <ne...@gmail.com>
Authored: Wed Nov 16 16:36:30 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Wed Nov 16 16:36:45 2016 -0800

----------------------------------------------------------------------
 src/linux/routing/handle.cpp        | 9 ++++++---
 src/linux/routing/handle.hpp        | 2 +-
 src/tests/common/recordio_tests.cpp | 8 ++++----
 3 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e76e8699/src/linux/routing/handle.cpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/handle.cpp b/src/linux/routing/handle.cpp
index 3d8d2f1..9781bd8 100644
--- a/src/linux/routing/handle.cpp
+++ b/src/linux/routing/handle.cpp
@@ -57,10 +57,13 @@ Try<Handle> Handle::parse(const string& str)
 }
 
 
-ostream& operator<<(ostream& out, const Handle& handle)
+ostream& operator<<(ostream& stream, const Handle& handle)
 {
-  out << std::hex << handle.primary() << ":" << handle.secondary() << std::dec;
-  return out;
+  stream << std::hex
+         << handle.primary() << ":"
+         << handle.secondary()
+         << std::dec;
+  return stream;
 }
 
 } // namespace routing {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e76e8699/src/linux/routing/handle.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/handle.hpp b/src/linux/routing/handle.hpp
index bafeec2..a0ee06a 100644
--- a/src/linux/routing/handle.hpp
+++ b/src/linux/routing/handle.hpp
@@ -70,7 +70,7 @@ protected:
 };
 
 
-std::ostream& operator<<(std::ostream& out, const Handle& handle);
+std::ostream& operator<<(std::ostream& stream, const Handle& handle);
 
 
 // Packets flowing from the device driver to the network stack are

http://git-wip-us.apache.org/repos/asf/mesos/blob/e76e8699/src/tests/common/recordio_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/common/recordio_tests.cpp b/src/tests/common/recordio_tests.cpp
index 3d14953..86a1117 100644
--- a/src/tests/common/recordio_tests.cpp
+++ b/src/tests/common/recordio_tests.cpp
@@ -51,17 +51,17 @@ bool operator==(const Result<T>& lhs, const Result<T>& rhs)
 
 
 template <typename T>
-std::ostream& operator<<(std::ostream& out, const Result<T>& r)
+std::ostream& operator<<(std::ostream& stream, const Result<T>& r)
 {
   if (r.isNone()) {
-    return out << "none";
+    return stream << "none";
   }
 
   if (r.isError()) {
-    return out << "error(\"" << r.error() << "\")";
+    return stream << "error(\"" << r.error() << "\")";
   }
 
-  return out << r.get();
+  return stream << r.get();
 }