From c4d677488b2a8fdc595f12dc50ea763f125e059f Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 28 May 2025 14:40:52 -0400 Subject: [PATCH] MT#62181 use references instead of copies Change-Id: I4ba9d630d8896a4b4a83eb47a3678808a2a66869 Warned-by: Coverity --- apps/sbc/RegisterCache.cpp | 2 +- apps/sbc/RegisterCache.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sbc/RegisterCache.cpp b/apps/sbc/RegisterCache.cpp index be4a5dcf..521604f2 100644 --- a/apps/sbc/RegisterCache.cpp +++ b/apps/sbc/RegisterCache.cpp @@ -413,7 +413,7 @@ void _RegisterCache::update(long int reg_expires, const AliasEntry& alias_update } // relink binding with the new index - auto binding = binding_it->second; + auto& binding = binding_it->second; reg_cache_ht.erase_binding(aor_e_it, binding_it); binding_it = aor_e_it->second.insert(make_pair(idx, binding)).first; } diff --git a/apps/sbc/RegisterCache.h b/apps/sbc/RegisterCache.h index a9980bdc..697d4e23 100644 --- a/apps/sbc/RegisterCache.h +++ b/apps/sbc/RegisterCache.h @@ -239,7 +239,7 @@ public: string ip; unsigned short port; - ContactKey(string _uri, string _ip, unsigned short _port) + ContactKey(const string& _uri, const string& _ip, unsigned short _port) : uri(_uri), ip(_ip), port(_port)