示例#1
0
	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 ) );
	}
示例#2
0
文件: UserInfo.cpp 项目: twd2/WDict
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);
}