diff mbox

[5/8] include/types.h: change operator<< function parameter

Message ID 1360104750-16098-6-git-send-email-danny.al-gaaf@bisect.de (mailing list archive)
State New, archived
Headers show

Commit Message

Danny Al-Gaaf Feb. 5, 2013, 10:52 p.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/src/include/types.h b/src/include/types.h
index c783b6e..dff47ac 100644
--- a/src/include/types.h
+++ b/src/include/types.h
@@ -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;
 }