mds: avoid copy in SessionMap::get_or_add_session()

CID 717032 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
Passing parameter i of type entity_inst_t (size 152 bytes) by value.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-10-21 20:57:14 -07:00
parent 7a3ccef89c
commit da5b244700

View File

@ -276,7 +276,7 @@ public:
return session_map[w];
return 0;
}
Session* get_or_add_session(entity_inst_t i) {
Session* get_or_add_session(const entity_inst_t& i) {
Session *s;
if (session_map.count(i.name))
s = session_map[i.name];