X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdebug%2Fprofiler.cpp;h=e3d98408d6d2244c47da824c8cf0fde3c0998c89;hb=c7afef88380ebebc8c2b04e48664d73281ec8848;hp=3ccf2987106d423aa313bfa50e1e0080df120533;hpb=967785734be5c3fc6f75da122c2d93ebbb338271;p=libs%2Fcore.git diff --git a/source/debug/profiler.cpp b/source/debug/profiler.cpp index 3ccf298..e3d9840 100644 --- a/source/debug/profiler.cpp +++ b/source/debug/profiler.cpp @@ -1,5 +1,5 @@ -#include "../core/except.h" -#include "../time/units.h" +#include +#include #include "profiler.h" using namespace std; @@ -72,11 +72,7 @@ void Profiler::record(const string &scope_name, const string &parent, const Time const Profiler::ScopeInfo &Profiler::scope(const string &sn) const { - map::const_iterator i = scopes.find(sn); - if(i==scopes.end()) - throw KeyError("Unknown scope"); - - return i->second; + return get_item(scopes, sn); }