From: Mikko Rasa Date: Thu, 9 Jun 2011 13:03:37 +0000 (+0300) Subject: Use the get_item function in Profiler::get_scope X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f4cf84ddec17f4fec0d9ba7e6814a8af8ff50395;p=libs%2Fcore.git Use the get_item function in Profiler::get_scope --- diff --git a/source/debug/profiler.cpp b/source/debug/profiler.cpp index 0167ff9..e3d9840 100644 --- a/source/debug/profiler.cpp +++ b/source/debug/profiler.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include "profiler.h" @@ -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); }