本文整理汇总了C++中utHashTable::find方法的典型用法代码示例。如果您正苦于以下问题:C++ utHashTable::find方法的具体用法?C++ utHashTable::find怎么用?C++ utHashTable::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utHashTable
的用法示例。
在下文中一共展示了utHashTable::find方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loom_asset_registerType
void loom_asset_registerType(unsigned int type, LoomAssetDeserializeCallback deserializer, LoomAssetRecognizerCallback recognizer)
{
lmAssert(gAssetDeserializerMap.find(type) == UT_NPOS, "Asset type already registered!");
gAssetDeserializerMap.insert(type, deserializer);
gRecognizerList.push_back(recognizer);
}
示例2: regenerateSourceBreakpoints
static void regenerateSourceBreakpoints()
{
sourceBreakpoints.clear();
for (UTsize i = 0; i < breakpoints.size(); i++)
{
Breakpoint *bp = breakpoints.at(i);
utFastStringHash fhash(bp->source);
if (sourceBreakpoints.find(fhash) == UT_NPOS)
{
utArray<Breakpoint *> bps;
sourceBreakpoints.insert(fhash, bps);
}
sourceBreakpoints.get(fhash)->push_back(bp);
}
}
示例3: lmAssert
// Helper to deserialize an asset, routing to the right function by type.
static void *loom_asset_deserializeAsset(const utString &path, int type, int size, void *ptr, LoomAssetCleanupCallback *dtor)
{
lmAssert(gAssetDeserializerMap.find(type) != UT_NPOS, "Can't deserialize asset, no deserializer was set for type %x!", type);
LoomAssetDeserializeCallback ladc = *gAssetDeserializerMap.get(type);
if (ladc == NULL)
{
lmLogError(gAssetLogGroup, "Failed deserialize asset '%s', deserializer was not found for type '%x'!", path.c_str(), type);
return NULL;
}
void *assetBits = ladc(ptr, size, dtor);
if (assetBits == NULL)
{
lmLogError(gAssetLogGroup, "Failed to deserialize asset '%s', deserializer returned NULL for type '%x'!", path.c_str(), type);
return NULL;
}
return assetBits;
}