rsked/playpref.cc
/// Append the player name for the medium+encoding. Will be lower priority than
/// any player already added for that m+e.
///
Append the player name for the medium+encoding. Will be lower priority than
any player already added for that m+e.
Append the player name for the medium + encoding . Will be lower priority than any player already added for that m + e .
void Player_prefs::add_player(Medium m, Encoding e, const std::string &name)
{
    int key = me_to_key( m, e );
    auto it = m_srcmap.find(key);
    if (it != m_srcmap.end()) {
        auto vec = it->second;
        if (std::find(vec.begin(),vec.end(),name) != vec.end()) {
            return;             
        }
    }
    m_srcmap[key].emplace_back( name );
}
void Player_prefs :: add_player ( Medium m , Encoding e , const std :: string & name ) { int key = me_to_key ( m , e ) ; auto it = m_srcmap . find ( key ) ; if ( it != m_srcmap . end ( ) ) { auto vec = it -> second ; if ( std :: find ( vec . begin ( ) , vec . end ( ) , name ) != vec . end ( ) ) { return ; } } m_srcmap [ key ] . emplace_back ( name ) ; }
Append the player name for the medium+encoding.
Append the player name for the medium + encoding .
// exists check // already present // emplace at end.