예제 #1
0
void OnAmxxDetach()
{
	while (!g_FreeTRs.empty())
	{
		delete g_FreeTRs.front();
		g_FreeTRs.pop();
	}

	while (!g_KVDWs.empty())
		delete g_KVDWs.popCopy();

	while (!g_FreeKVDWs.empty())
		delete g_FreeKVDWs.popCopy();
}
예제 #2
0
void OnAmxxDetach()
{
	ConfigManager->CloseGameConfigFile(CommonConfig);
	ConfigManager->CloseGameConfigFile(GamerulesConfig);

	while (!g_FreeTRs.empty())
	{
		delete g_FreeTRs.front();
		g_FreeTRs.pop();
	}

	while (!g_KVDWs.empty())
		delete g_KVDWs.popCopy();

	while (!g_FreeKVDWs.empty())
		delete g_FreeKVDWs.popCopy();
}
예제 #3
0
static void
EnterMemoryScope(ke::Vector<MemoryScope>& frame)
{
  if (frame.empty())
    frame.append(MemoryScope{0});
  else
    frame.append(MemoryScope{frame.back().scope_id + 1});
}
예제 #4
0
파일: CLang.cpp 프로젝트: Misiaczek/amxmodx
void CLangMngr::CLang::MergeDefinitions(ke::Vector<sKeyDef> &vec)
{
	ke::AutoString *pDef;
	int key = -1;
	
	while (!vec.empty())
	{
		auto keydef = vec.popCopy();

		key = keydef.key;
		pDef = keydef.definition;

		AddEntry(key, pDef->ptr());

		delete pDef;
	}
}
예제 #5
0
파일: fm_tr2.cpp 프로젝트: Javivi/amxmodx
static cell AMX_NATIVE_CALL create_kvd(AMX *amx, cell *params)
{
    KVD_Wrapper *kvdw;
    if (g_FreeKVDWs.empty()) {
        kvdw = new KVD_Wrapper;
    } else {
        kvdw = g_FreeKVDWs.popCopy();
    }

    kvdw->cls = "";
    kvdw->kvd.szClassName = const_cast<char*>(kvdw->cls.chars());
    kvdw->key = "";
    kvdw->kvd.szKeyName = const_cast<char*>(kvdw->key.chars());
    kvdw->val = "";
    kvdw->kvd.szValue = const_cast<char*>(kvdw->val.chars());
    kvdw->kvd.fHandled = 0;

    g_KVDWs.append(kvdw);

    return reinterpret_cast<cell>(kvdw);
}