src/shared/profile_engine.cpp
inline size_t appendAndOrGetIndex(vector<Governor> & vec, Governor const & gov) {
    size_t preAddSize = vec.size();

    for (int i=0; i<preAddSize; i++)
        if (vec[i].name == gov.name) 
            return i;

    vec.push_back(gov);
    return preAddSize;
}
//returns the index of the value, wether added or already present
returns the index of the value, wether added or already present
returns the index of the value wether added or already present
inline size_t appendAndOrGetIndex(vector<Governor> & vec, Governor const & gov) {
    size_t preAddSize = vec.size();
    for (int i=0; i<preAddSize; i++)
        if (vec[i].name == gov.name) 
            return i;
    vec.push_back(gov);
    return preAddSize;
}
inline size_t appendAndOrGetIndex ( vector < Governor > & vec , Governor const & gov ) { size_t preAddSize = vec . size ( ) ; for ( int i = 0 ; i < preAddSize ; i ++ ) if ( vec [ i ] . name == gov . name ) return i ; vec . push_back ( gov ) ; return preAddSize ; }
returns the index of the value, wether added or already present
returns the index of the value wether added or already present