]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_replica_log_types.h: pass const std::list<> by reference 453/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 20 Jul 2013 18:14:20 +0000 (20:14 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 20 Jul 2013 18:15:57 +0000 (20:15 +0200)
Pass  const std::list<> parameter by refrence to
cls_replica_log_progress_marker().

From cppcheck:
 [src/cls/replica_log/cls_replica_log_types.h:64]: (performance)
  Function parameter 'b' should be passed by reference.

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

index acd55dde533349fa6192a468640cf1451cf4c445..6056f8e4468b91610aec321f1216bf44d3314e06 100644 (file)
@@ -61,7 +61,7 @@ struct cls_replica_log_progress_marker {
                                     position_time(time) {}
   cls_replica_log_progress_marker(const string& entity, const string& marker,
                                   const utime_t& time,
-                                  const std::list<cls_replica_log_item_marker> b) :
+                                  const std::list<cls_replica_log_item_marker>& b) :
                                     entity_id(entity), position_marker(marker),
                                     position_time(time),
                                     items(b) {}