From: Danny Al-Gaaf Date: Wed, 19 Feb 2014 16:51:48 +0000 (+0100) Subject: CrushWrapper::is_valid_crush_loc(): pass function parameter by reference X-Git-Tag: v0.78~138^2~16 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4a48d8edd122e1d276dde335ee94d2a87d51f447;p=ceph.git CrushWrapper::is_valid_crush_loc(): pass function parameter by reference [src/crush/CrushWrapper.cc:1412]: (performance) Function parameter 'loc' should be passed by reference. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 50a1d9b1435bf..8db506a6f2d00 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -1409,7 +1409,7 @@ bool CrushWrapper::is_valid_crush_name(const string& s) } bool CrushWrapper::is_valid_crush_loc(CephContext *cct, - const map loc) + const map& loc) { for (map::const_iterator l = loc.begin(); l != loc.end(); ++l) { if (!is_valid_crush_name(l->first) || diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index b753821887053..c43a245b20093 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -904,7 +904,7 @@ public: static bool is_valid_crush_name(const string& s); static bool is_valid_crush_loc(CephContext *cct, - const map loc); + const map& loc); }; WRITE_CLASS_ENCODER(CrushWrapper)