diff options
author | 2016-05-31 23:49:55 +0200 | |
---|---|---|
committer | 2016-06-07 21:44:15 +0200 | |
commit | 81880659d23b36598f498e32f24fd6a4cecbd80b (patch) | |
tree | d7cd226d8335ba06fab273b1616231881ecfe766 /src/lib/netlist/plib/pparser.cpp | |
parent | 3d3f5761f0b0419581762f72ea0984e047d3e55c (diff) |
- More code cleanup.
- Dead code removal and minor refactoring.
- Simplify. Align naming with stl. Fix somed pedantic warnings.
- More STL compatability.
- Remove ATTR_HOT and ATTR_COLD. Refactored netlist_time.
- Fix long standing workaround which would ignore policy of change-only"
propagation.
- Rewrote for loops to use auto : semantics.
- Truthtable cleanup. (nw)
- Get rid of nl_math. Remove nl_util.h and moved contents to
plib/putil.h.
- Fix standalone build. Refactor ptypes.h.
[Couriersud]
Diffstat (limited to 'src/lib/netlist/plib/pparser.cpp')
-rw-r--r-- | src/lib/netlist/plib/pparser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/netlist/plib/pparser.cpp b/src/lib/netlist/plib/pparser.cpp index ad60a91b4b1..359e4415d72 100644 --- a/src/lib/netlist/plib/pparser.cpp +++ b/src/lib/netlist/plib/pparser.cpp @@ -243,7 +243,7 @@ ptokenizer::token_t ptokenizer::get_token_internal() } -ATTR_COLD void ptokenizer::error(const pstring &errs) +void ptokenizer::error(const pstring &errs) { verror("Error: " + errs, currentline_no(), currentline_str()); //throw error; @@ -360,13 +360,13 @@ pstring ppreprocessor::replace_macros(const pstring &line) { pstring_vector_t elems(line, m_expr_sep); pstringbuffer ret = ""; - for (std::size_t i=0; i<elems.size(); i++) + for (auto & elem : elems) { - define_t *def = get_define(elems[i]); + define_t *def = get_define(elem); if (def != nullptr) ret.cat(def->m_replace); else - ret.cat(elems[i]); + ret.cat(elem); } return ret; } @@ -374,9 +374,9 @@ pstring ppreprocessor::replace_macros(const pstring &line) static pstring catremainder(const pstring_vector_t &elems, std::size_t start, pstring sep) { pstringbuffer ret = ""; - for (std::size_t i=start; i<elems.size(); i++) + for (auto & elem : elems) { - ret.cat(elems[i]); + ret.cat(elem); ret.cat(sep); } return ret; |