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/prg/nltool.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/netlist/prg/nltool.cpp') diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index 31cb8af00f6..92057688954 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -36,7 +36,7 @@ public: opt_help(*this, "h", "help", "display help and exit"), opt_grp2(*this, "Options for run and static commands", "These options apply to run and static commands."), opt_name(*this, "n", "name", "", "the netlist in file specified by ""-f"" option to run; default is first one"), - opt_grp3(*this, "Options for run command", "These options are only used by the run command."), + opt_grp3(*this, "Options for run command", "These options are only used by the run command."), opt_ttr (*this, "t", "time_to_run", 1.0, "time to run the emulation (seconds)"), opt_logs(*this, "l", "log" , "define terminal to log. This option may be specified repeatedly."), opt_inp(*this, "i", "input", "", "input file to process (default is none)"), @@ -196,10 +196,10 @@ struct input_t static_cast(m_param)->setTo(m_value); break; case netlist::param_t::INTEGER: - static_cast(m_param)->setTo((int)m_value); + static_cast(m_param)->setTo(static_cast(m_value)); break; case netlist::param_t::LOGIC: - static_cast(m_param)->setTo((int) m_value); + static_cast(m_param)->setTo(static_cast(m_value)); break; } } @@ -335,7 +335,7 @@ static void listdevices(tool_options_t &opts) if (t.second->name().startsWith(d->name())) { pstring tn(t.second->name().substr(d->name().len()+1)); - if (tn.find(".")<0) + if (tn.find(".") == tn.end()) terms.push_back(tn); } } @@ -345,7 +345,7 @@ static void listdevices(tool_options_t &opts) if (t.first.startsWith(d->name())) { pstring tn(t.first.substr(d->name().len()+1)); - if (tn.find(".")<0) + if (tn.find(".") == tn.end()) { terms.push_back(tn); pstring resolved = nt.setup().resolve_alias(t.first); -- cgit v1.2.3-70-g09d2