From 336814c4ecb7993b994567527c27e0915dc207fb Mon Sep 17 00:00:00 2001 From: Thiago Farina Date: Fri, 4 Dec 2015 20:31:19 -0200 Subject: [PATCH] make use of Bindings typedef Looks like we declared this typedef but never used it. It seems we just forgot to use it so this patch makes uses of it now. Otherwise we could just delete it. --- src/eval_env.cc | 2 +- src/eval_env.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eval_env.cc b/src/eval_env.cc index e991d21..937a673 100644 --- a/src/eval_env.cc +++ b/src/eval_env.cc @@ -55,7 +55,7 @@ void Rule::AddBinding(const string& key, const EvalString& val) { } const EvalString* Rule::GetBinding(const string& key) const { - map::const_iterator i = bindings_.find(key); + Bindings::const_iterator i = bindings_.find(key); if (i == bindings_.end()) return NULL; return &i->second; diff --git a/src/eval_env.h b/src/eval_env.h index 28c4d16..999ce42 100644 --- a/src/eval_env.h +++ b/src/eval_env.h @@ -57,7 +57,6 @@ struct Rule { const string& name() const { return name_; } - typedef map Bindings; void AddBinding(const string& key, const EvalString& val); static bool IsReservedBinding(const string& var); @@ -69,7 +68,8 @@ struct Rule { friend struct ManifestParser; string name_; - map bindings_; + typedef map Bindings; + Bindings bindings_; }; /// An Env which contains a mapping of variables to values -- 2.7.4