X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdebug%2Fprofiler.cpp;h=e3d98408d6d2244c47da824c8cf0fde3c0998c89;hb=f4cf84ddec17f4fec0d9ba7e6814a8af8ff50395;hp=ba69a61d5c511aa40374ced75892c5b8d07c372a;hpb=d5dd704b2576f878809e87dbb8ff8591b9bdbce4;p=libs%2Fcore.git diff --git a/source/debug/profiler.cpp b/source/debug/profiler.cpp index ba69a61..e3d9840 100644 --- a/source/debug/profiler.cpp +++ b/source/debug/profiler.cpp @@ -1,12 +1,5 @@ -/* $Id$ - -This file is part of libmspcore -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include "../core/except.h" -#include "../time/units.h" +#include +#include #include "profiler.h" using namespace std; @@ -79,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); }