]> git.tdb.fi Git - builder.git/blobdiff - source/dependencycache.cpp
Further changes for library compatibility
[builder.git] / source / dependencycache.cpp
index ffc6fd63fbc7291c289395f9230abc78a83378ca..f691d540190f65da3444ec97823562b3fb05afcd 100644 (file)
@@ -5,8 +5,8 @@ Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#include <msp/core/maputils.h>
 #include <msp/fs/stat.h>
-#include <msp/io/except.h>
 #include <msp/io/file.h>
 #include <msp/io/print.h>
 #include <msp/strings/utils.h>
@@ -30,11 +30,7 @@ void DependencyCache::set_deps(const string &tgt, const StringList &d)
 
 const StringList &DependencyCache::get_deps(const string &tgt) const
 {
-       DepsMap::const_iterator i = deps.find(tgt);
-       if(i==deps.end())
-               throw KeyError("Unknown dependencies", tgt);
-
-       return i->second;
+       return get_item(deps, tgt);
 }
 
 void DependencyCache::save() const
@@ -68,8 +64,8 @@ void DependencyCache::load()
                        deps[parts[0]] = StringList(parts.begin()+1, parts.end());
                }
 
-               mtime = Time::TimeStamp::from_unixtime(FS::stat(fn).st_mtime);
+               mtime = FS::stat(fn).get_modify_time();
        }
-       catch(const IO::FileNotFound &)
+       catch(const IO::file_not_found &)
        { }
 }