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