xgc_void XGameMap::SetCounter( xgc_lpcstr lpCounterName, xgc_long nVal ) { auto iter = mMapCounter.find( lpCounterName ); XGC_ASSERT_RETURN( iter != mMapCounter.end(), xgc_void( 0 ) ); IncCounter( lpCounterName, nVal - std::get< 2 >( iter->second ) ); }
void UserInfo::AppendHistory(const std::string &word) { std::ofstream ofs(historyFilename, std::ios_base::app); ofs << word << std::endl; ofs.close(); IncCounter(word, COUNTER_RETRIVE); }