本文整理汇总了C++中ke::Vector::popCopy方法的典型用法代码示例。如果您正苦于以下问题:C++ Vector::popCopy方法的具体用法?C++ Vector::popCopy怎么用?C++ Vector::popCopy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ke::Vector
的用法示例。
在下文中一共展示了Vector::popCopy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAmxxDetach
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: OnAmxxDetach
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:
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;
}
}
示例4:
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);
}