X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fdependencycache.cpp;h=8582e583a7ad1d3bcf01c7750a9f7138c881153e;hb=51d5a0f618faabfce9a0a5d5dd64b0b0d52b97cb;hp=ffc6fd63fbc7291c289395f9230abc78a83378ca;hpb=04c316da6d5d90e43cba262f54d90ca231f703bf;p=builder.git diff --git a/source/dependencycache.cpp b/source/dependencycache.cpp index ffc6fd6..8582e58 100644 --- a/source/dependencycache.cpp +++ b/source/dependencycache.cpp @@ -1,12 +1,5 @@ -/* $Id$ - -This file is part of builder -Copyright © 2007-2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - +#include #include -#include #include #include #include @@ -30,11 +23,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 +57,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 &) { } }