Esempio n. 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();
}
Esempio n. 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();
}
Esempio n. 3
0
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;
	}
}
Esempio n. 4
0
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);
}