]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CrushWrapper::is_valid_crush_loc(): pass function parameter by reference
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 16:51:48 +0000 (17:51 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 16:51:48 +0000 (17:51 +0100)
[src/crush/CrushWrapper.cc:1412]: (performance) Function parameter 'loc'
  should be passed by reference.

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

index 50a1d9b1435bf1175ac81f728230862023d2689e..8db506a6f2d00aab3a85f86c7ee8046cf5fdb4b7 100644 (file)
@@ -1409,7 +1409,7 @@ bool CrushWrapper::is_valid_crush_name(const string& s)
 }
 
 bool CrushWrapper::is_valid_crush_loc(CephContext *cct,
-                                      const map<string,string> loc)
+                                      const map<string,string>& loc)
 {
   for (map<string,string>::const_iterator l = loc.begin(); l != loc.end(); ++l) {
     if (!is_valid_crush_name(l->first) ||
index b753821887053db50219c19ee7802df4188c99c9..c43a245b20093280121b822b44539970194969ab 100644 (file)
@@ -904,7 +904,7 @@ public:
 
   static bool is_valid_crush_name(const string& s);
   static bool is_valid_crush_loc(CephContext *cct,
-                                const map<string,string> loc);
+                                const map<string,string>& loc);
 };
 WRITE_CLASS_ENCODER(CrushWrapper)