From: Sage Weil Date: Sat, 25 Aug 2012 02:52:20 +0000 (-0700) Subject: common/LogEntry: pass by value for contains() X-Git-Tag: v0.53~229^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f51f568551c99e7cd64187e04e462ce76d6b724b;p=ceph.git common/LogEntry: pass by value for contains() CID 717031: Big parameter passed by value (PASS_BY_VALUE) At (1): Passing parameter k of type LogEntryKey (size 168 bytes) by value. Signed-off-by: Sage Weil --- diff --git a/src/common/LogEntry.h b/src/common/LogEntry.h index 67ac9e638340c..160d0d0029415 100644 --- a/src/common/LogEntry.h +++ b/src/common/LogEntry.h @@ -84,11 +84,12 @@ struct LogSummary { while (tail.size() > 50) tail.pop_front(); } - bool contains(LogEntryKey k) const { + bool contains(const LogEntryKey& k) const { for (list::const_iterator p = tail.begin(); p != tail.end(); p++) - if (p->key() == k) return true; + if (p->key() == k) + return true; return false; }