mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Remove Ui Content counter in Lua profiler
This commit is contained in:
parent
bbbef96087
commit
fb0646dda1
@ -644,7 +644,6 @@ namespace MWLua
|
||||
outMemSize(mLua.getTotalMemoryUsage());
|
||||
out << "\n";
|
||||
out << "LuaUtil::ScriptsContainer count: " << LuaUtil::ScriptsContainer::getInstanceCount() << "\n";
|
||||
out << "LuaUi::Content count: " << LuaUi::Content::getInstanceCount() << "\n";
|
||||
out << "\n";
|
||||
out << "small alloc max size = " << smallAllocSize << " (section [Lua] in settings.cfg)\n";
|
||||
out << "Smaller values give more information for the profiler, but increase performance overhead.\n";
|
||||
|
@ -11,11 +11,4 @@ namespace LuaUi::Content
|
||||
throw std::logic_error("Expected function");
|
||||
return metatable["new"].get<sol::protected_function>();
|
||||
}
|
||||
|
||||
int64_t View::sInstanceCount = 0;
|
||||
|
||||
int64_t getInstanceCount()
|
||||
{
|
||||
return View::sInstanceCount;
|
||||
}
|
||||
}
|
||||
|
@ -15,27 +15,13 @@ namespace LuaUi::Content
|
||||
class View
|
||||
{
|
||||
public:
|
||||
static int64_t sInstanceCount; // debug information, shown in Lua profiler
|
||||
|
||||
// accepts only Lua tables returned by ui.content
|
||||
explicit View(sol::table table)
|
||||
: mTable(std::move(table))
|
||||
{
|
||||
if (!isValid(mTable))
|
||||
throw std::domain_error("Expected a Content table");
|
||||
sInstanceCount++;
|
||||
}
|
||||
View(const View& c)
|
||||
{
|
||||
this->mTable = c.mTable;
|
||||
sInstanceCount++;
|
||||
}
|
||||
View(View&& c)
|
||||
{
|
||||
this->mTable = std::move(c.mTable);
|
||||
sInstanceCount++;
|
||||
}
|
||||
~View() { sInstanceCount--; }
|
||||
|
||||
static bool isValid(const sol::object& object)
|
||||
{
|
||||
@ -123,8 +109,6 @@ namespace LuaUi::Content
|
||||
static inline size_t toLua(size_t index) { return index + 1; }
|
||||
static inline size_t fromLua(size_t index) { return index - 1; }
|
||||
};
|
||||
|
||||
int64_t getInstanceCount();
|
||||
}
|
||||
|
||||
#endif // COMPONENTS_LUAUI_CONTENT
|
||||
|
Loading…
Reference in New Issue
Block a user