summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pparser.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-02-04 00:27:23 +0100
committer couriersud <couriersud@gmx.org>2019-02-04 00:27:23 +0100
commitc87a487d6de35479210d36dcf53d2c96a478601a (patch)
treeedfe287e40924ec564646547d5897dbac2d3f01c /src/lib/netlist/plib/pparser.h
parent9b2c04fc9f7870ca6bf6c941d8bb68a2e2d6a408 (diff)
netlist: Refactoring and some functionality enhancements. (nw)
- Removed dead code. - nltool now adds a define NLTOOL_VERSION. This can be tested in netlists. It is used in kidniki to ensure I stop committing debug parameters. - Optimized the proposal for no-deactivate hints. - Documented in breakout that hints were manually optimized. - Minor optimizations in the order of 2% enhancement.
Diffstat (limited to 'src/lib/netlist/plib/pparser.h')
-rw-r--r--src/lib/netlist/plib/pparser.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/netlist/plib/pparser.h b/src/lib/netlist/plib/pparser.h
index 1eeb92d797b..3829e8cdcc8 100644
--- a/src/lib/netlist/plib/pparser.h
+++ b/src/lib/netlist/plib/pparser.h
@@ -163,7 +163,9 @@ public:
pstring m_replace;
};
- explicit ppreprocessor(std::vector<define_t> *defines = nullptr);
+ using defines_map_type = std::unordered_map<pstring, define_t>;
+
+ explicit ppreprocessor(defines_map_type *defines = nullptr);
virtual ~ppreprocessor() override {}
template <typename T>
@@ -214,7 +216,7 @@ private:
pstring process_line(pstring line);
pstring process_comments(pstring line);
- std::unordered_map<pstring, define_t> m_defines;
+ defines_map_type m_defines;
std::vector<pstring> m_expr_sep;
std::uint_least64_t m_ifflag; // 31 if levels