]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
include/types.h: change operator<< function parameter
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 6 Feb 2013 11:02:48 +0000 (12:02 +0100)
committerSage Weil <sage@inktank.com>
Wed, 6 Feb 2013 16:42:03 +0000 (08:42 -0800)
Fix "Function parameter 'v' should be passed by reference." from cppchecker.
Use 'const pair<A,B>& v' similar to the other operator<< in this file.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/include/types.h

index c783b6e93ce9866f002a0f6ddaa8613f2320d21f..dff47ac2b98624632fb55f0f60a80d7dca726297 100644 (file)
@@ -120,7 +120,7 @@ namespace __gnu_cxx {
 // -- io helpers --
 
 template<class A, class B>
-inline ostream& operator<<(ostream& out, const pair<A,B> v) {
+inline ostream& operator<<(ostream& out, const pair<A,B>& v) {
   return out << v.first << "," << v.second;
 }