diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-09-09 13:09:46 +0100 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-09-21 00:31:12 +0100 |
| commit | 7b1bcae879305da138bb3e08d04735b54266c537 (patch) | |
| tree | 1ca365c8b49b0696a61729bccf43fb1b1c58df3b /utils/regtools/lib | |
| parent | 84ff8a4df9eac157ea9df22054b996fef5b34d8f (diff) | |
| download | rockbox-7b1bcae879305da138bb3e08d04735b54266c537.zip rockbox-7b1bcae879305da138bb3e08d04735b54266c537.tar.gz rockbox-7b1bcae879305da138bb3e08d04735b54266c537.tar.bz2 rockbox-7b1bcae879305da138bb3e08d04735b54266c537.tar.xz | |
regtools: rename error_t to err_t to avoid name clash
Change-Id: Ib8d34e4f58f3225b1dafc533ce7e1b7867ad053b
Diffstat (limited to 'utils/regtools/lib')
| -rw-r--r-- | utils/regtools/lib/formula.cpp | 2 | ||||
| -rw-r--r-- | utils/regtools/lib/soc_desc.cpp | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/utils/regtools/lib/formula.cpp b/utils/regtools/lib/formula.cpp index 1a6b16c..dbde20a 100644 --- a/utils/regtools/lib/formula.cpp +++ b/utils/regtools/lib/formula.cpp @@ -24,7 +24,7 @@ struct formula_evaluator va_start(args, fmt); vsnprintf(buffer,sizeof(buffer), fmt, args); va_end(args); - ctx.add(error_t(error_t::FATAL, m_loc, buffer)); + ctx.add(err_t(err_t::FATAL, m_loc, buffer)); return false; } 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<typename T> -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<typename T> 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<typename T> 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); |