@@ -245,23 +245,23 @@ void KatranLb::initialSanityChecking(bool flowDebug, bool globalLru) {
245245
246246 std::vector<std::string> maps;
247247
248- maps.push_back (KatranLbMaps::ctl_array);
249- maps.push_back (KatranLbMaps::vip_map);
250- maps.push_back (KatranLbMaps::ch_rings);
251- maps.push_back (KatranLbMaps::reals);
252- maps.push_back (KatranLbMaps::stats);
253- maps.push_back (KatranLbMaps::lru_mapping);
254- maps.push_back (KatranLbMaps::server_id_map);
255- maps.push_back (KatranLbMaps::lru_miss_stats);
256- maps.push_back (KatranLbMaps::vip_miss_stats);
257- maps.push_back (KatranLbMaps::vip_to_down_reals_map);
248+ maps.emplace_back (KatranLbMaps::ctl_array);
249+ maps.emplace_back (KatranLbMaps::vip_map);
250+ maps.emplace_back (KatranLbMaps::ch_rings);
251+ maps.emplace_back (KatranLbMaps::reals);
252+ maps.emplace_back (KatranLbMaps::stats);
253+ maps.emplace_back (KatranLbMaps::lru_mapping);
254+ maps.emplace_back (KatranLbMaps::server_id_map);
255+ maps.emplace_back (KatranLbMaps::lru_miss_stats);
256+ maps.emplace_back (KatranLbMaps::vip_miss_stats);
257+ maps.emplace_back (KatranLbMaps::vip_to_down_reals_map);
258258
259259 if (flowDebug) {
260- maps.push_back (KatranLbMaps::flow_debug_maps);
260+ maps.emplace_back (KatranLbMaps::flow_debug_maps);
261261 }
262262
263263 if (globalLru) {
264- maps.push_back (KatranLbMaps::global_lru_maps);
264+ maps.emplace_back (KatranLbMaps::global_lru_maps);
265265 }
266266
267267 res = getKatranProgFd ();
@@ -282,9 +282,9 @@ void KatranLb::initialSanityChecking(bool flowDebug, bool globalLru) {
282282 kHealthcheckerProgName ,
283283 folly::errnoStr (errno)));
284284 }
285- maps.push_back (KatranLbMaps::hc_ctrl_map);
286- maps.push_back (KatranLbMaps::hc_reals_map);
287- maps.push_back (KatranLbMaps::hc_stats_map);
285+ maps.emplace_back (KatranLbMaps::hc_ctrl_map);
286+ maps.emplace_back (KatranLbMaps::hc_reals_map);
287+ maps.emplace_back (KatranLbMaps::hc_stats_map);
288288 }
289289
290290 // some sanity checking. we will check that all maps exists, so in later
@@ -2816,7 +2816,7 @@ std::vector<std::string> KatranLb::deleteLru(
28162816 if (fallbackMapFd > 0 ) {
28172817 int res = bpfAdapter_->bpfMapDeleteElement (fallbackMapFd, &key);
28182818 if (res == 0 ) {
2819- mapsWithDeletions.push_back (" fallback" );
2819+ mapsWithDeletions.emplace_back (" fallback" );
28202820 } else {
28212821 if (errno != ENOENT ) {
28222822 // ENOENT is expected in case there is no entry in the lru map
0 commit comments