本文整理汇总了C++中Hash::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ Hash::reset方法的具体用法?C++ Hash::reset怎么用?C++ Hash::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hash
的用法示例。
在下文中一共展示了Hash::reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: profileEnd
void FW::profileEnd(bool printResults)
{
if (!Thread::isMain())
fail("profileEnd() can only be used in the main thread!");
if (!s_profileStarted)
return;
// Pop remaining timers.
while (s_profileStack.getSize())
profilePop();
// Recurse and print.
if (printResults && s_profileTimers.getSize() > 1)
{
printf("\n");
Array<Vec2i> stack(Vec2i(0, 0));
while (stack.getSize())
{
Vec2i entry = stack.removeLast();
const ProfileTimer& timer = s_profileTimers[entry.x];
for (int i = timer.children.getSize() - 1; i >= 0; i--)
stack.add(Vec2i(timer.children[i], entry.y + 2));
printf("%*s%-*s%-8.3f",
entry.y, "",
32 - entry.y, timer.id.getPtr(),
timer.timer.getTotal());
printf("%.0f%%\n", timer.timer.getTotal() / s_profileTimers[0].timer.getTotal() * 100.0f);
}
printf("\n");
}
// Clean up.
s_profileStarted = false;
s_profilePointerToToken.reset();
s_profileStringToToken.reset();
s_profileTimerHash.reset();
s_profileTimers.reset();
s_profileStack.reset();
}
示例2: popMemOwner
void FW::popMemOwner(void)
{
#if FW_MEM_DEBUG
U32 threadID = Thread::getID();
Array<const char*>* stack = s_memOwnerStacks.search(threadID);
if (stack)
{
stack->removeLast();
if (!stack->getSize())
{
s_memOwnerStacks.remove(threadID);
if (!s_memOwnerStacks.getSize())
s_memOwnerStacks.reset();
}
}
#endif
}