From 7b1bcae879305da138bb3e08d04735b54266c537 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 9 Sep 2016 13:09:46 +0100 Subject: regtools: rename error_t to err_t to avoid name clash Change-Id: Ib8d34e4f58f3225b1dafc533ce7e1b7867ad053b --- utils/regtools/lib/soc_desc.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'utils/regtools/lib/soc_desc.cpp') diff --git a/utils/regtools/lib/soc_desc.cpp b/utils/regtools/lib/soc_desc.cpp index b522016..3238c4d 100644 --- a/utils/regtools/lib/soc_desc.cpp +++ b/utils/regtools/lib/soc_desc.cpp @@ -149,23 +149,23 @@ std::string xml_loc(xmlAttr *attr) } template -bool add_error(error_context_t& ctx, error_t::level_t lvl, T *node, +bool add_error(error_context_t& ctx, err_t::level_t lvl, T *node, const std::string& msg) { - ctx.add(error_t(lvl, xml_loc(node), msg)); + ctx.add(err_t(lvl, xml_loc(node), msg)); return false; } template bool add_fatal(error_context_t& ctx, T *node, const std::string& msg) { - return add_error(ctx, error_t::FATAL, node, msg); + return add_error(ctx, err_t::FATAL, node, msg); } template bool add_warning(error_context_t& ctx, T *node, const std::string& msg) { - return add_error(ctx, error_t::WARNING, node, msg); + return add_error(ctx, err_t::WARNING, node, msg); } bool parse_wrong_version_error(xmlNode *node, error_context_t& ctx) @@ -529,7 +529,7 @@ bool parse_root_elem(xmlNode *node, soc_t& soc, error_context_t& ctx) END_ATTR_MATCH() if(!has_version) { - ctx.add(error_t(error_t::FATAL, xml_loc(node), "no version attribute, is this a v1 file ?")); + ctx.add(err_t(err_t::FATAL, xml_loc(node), "no version attribute, is this a v1 file ?")); return false; } if(ver != MAJOR_VERSION) @@ -660,7 +660,7 @@ namespace if((x) < 0) { \ std::ostringstream oss; \ oss << __FILE__ << ":" << __LINE__; \ - ctx.add(error_t(error_t::FATAL, oss.str(), "write error")); \ + ctx.add(err_t(err_t::FATAL, oss.str(), "write error")); \ return -1; \ } \ }while(0) @@ -1576,7 +1576,6 @@ node_inst_t node_inst_t::child(const std::string& name) const return child(name, INST_NO_INDEX); } - node_inst_t node_inst_t::child(const std::string& name, size_t index) const { std::vector< node_t > *nodes = get_children(m_node); -- cgit v1.1