From a30ae992d6ddbe2450135a0e9140b54331a19cfd Mon Sep 17 00:00:00 2001 From: Daniel Sipka Date: Tue, 21 Apr 2015 20:44:54 +0200 Subject: [PATCH] reformat --- include/mstch/mstch.hpp | 6 +++--- src/render_context.cpp | 6 +++--- src/state/render_state.hpp | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/mstch/mstch.hpp b/include/mstch/mstch.hpp index 6142b43..6462a2c 100644 --- a/include/mstch/mstch.hpp +++ b/include/mstch/mstch.hpp @@ -22,9 +22,9 @@ namespace mstch { } protected: template - void register_methods(S* sub, std::map methods) { - for(auto& item: methods) - this->methods.insert({item.first, std::bind(item.second, sub)}); + void register_methods(S* s, std::map methods) { + for(auto& i: methods) + this->methods.insert({i.first, std::bind(i.second, s)}); } private: std::map> methods; diff --git a/src/render_context.cpp b/src/render_context.cpp index ba46b73..c715b9c 100644 --- a/src/render_context.cpp +++ b/src/render_context.cpp @@ -44,9 +44,9 @@ const mstch::node& render_context::find_node( token.substr(token.rfind('.') + 1), {find_node(token.substr(0, token.rfind('.')), current_nodes)}); else - for (auto& node: current_nodes) - if (boost::apply_visitor(visitor::has_token(token), node)) - return boost::apply_visitor(visitor::get_token(token, node), node); + for (auto& i: current_nodes) + if (boost::apply_visitor(visitor::has_token(token), i)) + return boost::apply_visitor(visitor::get_token(token, i), i); return null_node; } diff --git a/src/state/render_state.hpp b/src/state/render_state.hpp index d16280c..d46fd26 100644 --- a/src/state/render_state.hpp +++ b/src/state/render_state.hpp @@ -8,7 +8,6 @@ namespace mstch { namespace state { class render_state { public: - virtual ~render_state() {} virtual std::string render( render_context& context, const token& token) = 0; };