From 1e40d95e8b47d834d1ede706921dc19850aaaff2 Mon Sep 17 00:00:00 2001 From: couriersud Date: Thu, 21 Jul 2016 11:05:55 +0200 Subject: Netlist updates: - Removed trampolines (OUTLOGIC, INPLOGIC and friends). - Started using doxygen comment and documentation style. Added doxygen files to documentation folder. - Refactored code triggered by doxygen output. - Moved internal and support classes into namespace detail. - Use an anordered map in parser. - -Wconversion fixes - All done now. - Fixed -Wold-style-cast warnings in netlist code. - Added iterators to pstring. - Moved two macros, added more RAII and improved exceptions. Fixed some bugs in parser code. - Fixed a number of bugs in parser code and exception handling. [Couriersud] --- src/lib/netlist/nl_parser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/netlist/nl_parser.cpp') diff --git a/src/lib/netlist/nl_parser.cpp b/src/lib/netlist/nl_parser.cpp index c0b0b56bdf1..6760873a4af 100644 --- a/src/lib/netlist/nl_parser.cpp +++ b/src/lib/netlist/nl_parser.cpp @@ -152,9 +152,9 @@ void parser_t::net_truthtable_start() { pstring name = get_identifier(); require_token(m_tok_comma); - unsigned ni = get_number_long(); + long ni = get_number_long(); require_token(m_tok_comma); - unsigned no = get_number_long(); + long no = get_number_long(); require_token(m_tok_comma); pstring def_param = get_string(); require_token(m_tok_param_right); @@ -162,8 +162,8 @@ void parser_t::net_truthtable_start() netlist::tt_desc desc; desc.classname = name; desc.name = name; - desc.ni = ni; - desc.no = no; + desc.ni = static_cast(ni); + desc.no = static_cast(no); desc.def_param = "+" + def_param; desc.family = ""; @@ -317,8 +317,8 @@ void parser_t::dippins() } if ((pins.size() % 2) == 1) error("You must pass an equal number of pins to DIPPINS"); - unsigned n = pins.size(); - for (unsigned i = 0; i < n / 2; i++) + std::size_t n = pins.size(); + for (std::size_t i = 0; i < n / 2; i++) { m_setup.register_alias(plib::pfmt("{1}")(i+1), pins[i*2]); m_setup.register_alias(plib::pfmt("{1}")(n-i), pins[i*2 + 1]); -- cgit v1.2.3-70-g09d2