diff --git a/xwords4/relay/configs.cpp b/xwords4/relay/configs.cpp index 3152f98a4..90b222149 100644 --- a/xwords4/relay/configs.cpp +++ b/xwords4/relay/configs.cpp @@ -133,7 +133,9 @@ RelayConfigs::SetValueFor( const char* key, const char* value ) m_values.erase(iter); } - m_values.insert( pair(strdup(key),strdup(value) ) ); + pair::iterator,bool> result = + m_values.insert( pair(strdup(key),strdup(value) ) ); + assert( result.second ); } ino_t diff --git a/xwords4/relay/crefmgr.cpp b/xwords4/relay/crefmgr.cpp index 290475b9b..c3441f486 100644 --- a/xwords4/relay/crefmgr.cpp +++ b/xwords4/relay/crefmgr.cpp @@ -462,7 +462,9 @@ CRefMgr::AddNew( const char* cookie, const char* connName, CookieID cid, ref->assignConnName(); - m_cookieMap.insert( pair(ref->GetCid(), ref ) ); + pair result = + m_cookieMap.insert( pair(ref->GetCid(), ref ) ); + assert( result.second ); logf( XW_LOGINFO, "%s: paired cookie %s/connName %s with cid %d", __func__, (cookie?cookie:"NULL"), connName, ref->GetCid() ); diff --git a/xwords4/relay/lstnrmgr.cpp b/xwords4/relay/lstnrmgr.cpp index 098605930..d01118413 100644 --- a/xwords4/relay/lstnrmgr.cpp +++ b/xwords4/relay/lstnrmgr.cpp @@ -171,7 +171,9 @@ ListenerMgr::addOne( int port, bool perGame ) success = sock != -1; if ( success ) { pairentry(port, perGame); - m_socks_to_ports.insert( pair >(sock, entry ) ); + pair >::iterator, bool> result + = m_socks_to_ports.insert( pair >(sock, entry ) ); + assert( result.second ); } return success; }