[PATCH 08/15] src/log/Entry.h: pass function parameter by reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix "(performance) Function parameter 's' should be passed by reference."
from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@xxxxxxxxx>
---
 src/log/Entry.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/log/Entry.h b/src/log/Entry.h
index 7f6b149..7cdf116 100644
--- a/src/log/Entry.h
+++ b/src/log/Entry.h
@@ -40,7 +40,7 @@ struct Entry {
     }
   }
 
-  void set_str(const std::string s) {
+  void set_str(const std::string &s) {
     ostream os(&m_streambuf);
     os << s;
   }
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux