]> git.tdb.fi Git - libs/core.git/blobdiff - source/debug/profiler.cpp
Merge branch 'io-master'
[libs/core.git] / source / debug / profiler.cpp
index 3ccf2987106d423aa313bfa50e1e0080df120533..e3d98408d6d2244c47da824c8cf0fde3c0998c89 100644 (file)
@@ -1,5 +1,5 @@
-#include "../core/except.h"
-#include "../time/units.h"
+#include <msp/core/maputils.h>
+#include <msp/time/units.h>
 #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<string, ScopeInfo>::const_iterator i = scopes.find(sn);
-       if(i==scopes.end())
-               throw KeyError("Unknown scope");
-
-       return i->second;
+       return get_item(scopes, sn);
 }