From f4cf84ddec17f4fec0d9ba7e6814a8af8ff50395 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 9 Jun 2011 16:03:37 +0300 Subject: [PATCH] Use the get_item function in Profiler::get_scope --- source/debug/profiler.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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); } -- 2.45.2