diff --git a/examples/make_hello_c/sim_main.cpp b/examples/make_hello_c/sim_main.cpp index fd5003027..17cd87887 100644 --- a/examples/make_hello_c/sim_main.cpp +++ b/examples/make_hello_c/sim_main.cpp @@ -19,7 +19,7 @@ int main(int argc, char** argv, char** env) { // e.g. examples/c_tracing. // Prevent unused variable warnings - if (0 && argc && argv && env) {} + if (false && argc && argv && env) {} // Construct the Verilated model, from Vtop.h generated from Verilating "top.v" Vtop* top = new Vtop; diff --git a/examples/make_hello_sc/sc_main.cpp b/examples/make_hello_sc/sc_main.cpp index 131527f5f..91f9b49ff 100644 --- a/examples/make_hello_sc/sc_main.cpp +++ b/examples/make_hello_sc/sc_main.cpp @@ -23,7 +23,7 @@ int sc_main(int argc, char* argv[]) { // e.g. examples/c_tracing. // Prevent unused variable warnings - if (0 && argc && argv) {} + if (false && argc && argv) {} // Construct the Verilated model, from Vtop.h generated from Verilating "top.v" Vtop* top = new Vtop("top"); diff --git a/examples/make_protect_lib/sim_main.cpp b/examples/make_protect_lib/sim_main.cpp index e329019b5..9850a54ad 100644 --- a/examples/make_protect_lib/sim_main.cpp +++ b/examples/make_protect_lib/sim_main.cpp @@ -20,7 +20,7 @@ vluint64_t main_time = 0; double sc_time_stamp() { return main_time; } int main(int argc, char** argv, char** env) { - if (0 && argc && argv && env) {} + if (false && argc && argv && env) {} Verilated::debug(0); Verilated::randReset(2); diff --git a/examples/make_tracing_c/sim_main.cpp b/examples/make_tracing_c/sim_main.cpp index 8da3fee7a..a934952fd 100644 --- a/examples/make_tracing_c/sim_main.cpp +++ b/examples/make_tracing_c/sim_main.cpp @@ -22,7 +22,7 @@ int main(int argc, char** argv, char** env) { // This is a more complicated example, please also see the simpler examples/make_hello_c. // Prevent unused variable warnings - if (0 && argc && argv && env) {} + if (false && argc && argv && env) {} // Set debug level, 0 is off, 9 is highest presently used // May be overridden by commandArgs diff --git a/examples/make_tracing_sc/sc_main.cpp b/examples/make_tracing_sc/sc_main.cpp index 8ec598d0b..8ab3120d4 100644 --- a/examples/make_tracing_sc/sc_main.cpp +++ b/examples/make_tracing_sc/sc_main.cpp @@ -24,7 +24,7 @@ int sc_main(int argc, char* argv[]) { // This is a more complicated example, please also see the simpler examples/make_hello_c. // Prevent unused variable warnings - if (0 && argc && argv) {} + if (false && argc && argv) {} // Set debug level, 0 is off, 9 is highest presently used // May be overridden by commandArgs diff --git a/include/verilated.cpp b/include/verilated.cpp index e5ad06077..2c8c1eada 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -77,7 +77,7 @@ VerilatedImp VerilatedImp::s_s; #ifndef VL_USER_FINISH ///< Define this to override this function void vl_finish(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE { - if (0 && hier) {} + if (false && hier) {} VL_PRINTF( // Not VL_PRINTF_MT, already on main thread "- %s:%d: Verilog $finish\n", filename, linenum); if (Verilated::gotFinish()) { @@ -100,7 +100,7 @@ void vl_stop(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE { #ifndef VL_USER_FATAL ///< Define this to override this function void vl_fatal(const char* filename, int linenum, const char* hier, const char* msg) VL_MT_UNSAFE { - if (0 && hier) {} + if (false && hier) {} Verilated::gotFinish(true); if (filename && filename[0]) { // Not VL_PRINTF_MT, already on main thread @@ -631,7 +631,7 @@ std::string _vl_vsformat_time(char* tmp, double ld, bool left, size_t width) { QData fracDiv = static_cast(vl_time_multiplier(fracDigits)); QData whole = static_cast(scaled) / fracDiv; QData fraction = static_cast(scaled) % fracDiv; - int digits; + int digits = 0; if (!fracDigits) { digits = sprintf(tmp, "%" VL_PRI64 "u%s", whole, suffix.c_str()); } else { @@ -731,20 +731,14 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA const int lbits = va_arg(ap, int); double d = va_arg(ap, double); if (lbits) {} // UNUSED - always 64 - switch (fmt) { - case '^': { // Realtime + if (fmt == '^') { // Realtime if (!widthSet) width = VerilatedImp::timeFormatWidth(); output += _vl_vsformat_time(tmp, d, left, width); - break; - } - default: { + } else { std::string fmt(pctp, pos - pctp + 1); sprintf(tmp, fmt.c_str(), d); output += tmp; - break; - } // - break; - } // switch + } break; } default: { @@ -752,7 +746,7 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA const int lbits = va_arg(ap, int); QData ld = 0; WData qlwp[VL_WQ_WORDS_E]; - WDataInP lwp; + WDataInP lwp = NULL; if (lbits <= VL_QUADSIZE) { ld = _VL_VA_ARG_Q(ap, lbits); VL_SET_WQ(qlwp, ld); @@ -768,7 +762,7 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA switch (fmt) { case 'c': { IData charval = ld & 0xff; - output += charval; + output += static_cast(charval); break; } case 's': { @@ -784,7 +778,7 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA break; } case 'd': { // Signed decimal - int digits; + int digits = 0; std::string append; if (lbits <= VL_QUADSIZE) { digits = sprintf(tmp, "%" VL_PRI64 "d", @@ -813,7 +807,7 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA break; } case '#': { // Unsigned decimal - int digits; + int digits = 0; std::string append; if (lbits <= VL_QUADSIZE) { digits = sprintf(tmp, "%" VL_PRI64 "u", ld); @@ -848,9 +842,10 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA // Octal numbers may span more than one wide word, // so we need to grab each bit separately and check for overrun // Octal is rare, so we'll do it a slow simple way - output += ('0' + ((VL_BITISSETLIMIT_W(lwp, lbits, lsb + 0)) ? 1 : 0) - + ((VL_BITISSETLIMIT_W(lwp, lbits, lsb + 1)) ? 2 : 0) - + ((VL_BITISSETLIMIT_W(lwp, lbits, lsb + 2)) ? 4 : 0)); + output += static_cast( + '0' + ((VL_BITISSETLIMIT_W(lwp, lbits, lsb + 0)) ? 1 : 0) + + ((VL_BITISSETLIMIT_W(lwp, lbits, lsb + 1)) ? 2 : 0) + + ((VL_BITISSETLIMIT_W(lwp, lbits, lsb + 2)) ? 4 : 0)); } break; case 'u': @@ -863,8 +858,8 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA const int wr_bytes = std::min(4, bytes_to_go); for (int byte = 0; byte < wr_bytes; byte++, bit += 8) output += static_cast(VL_BITRSHIFT_W(lwp, bit) & 0xff); - output.append(4 - wr_bytes, (char)0); - if (is_4_state) output.append(4, (char)0); + output.append(4 - wr_bytes, static_cast(0)); + if (is_4_state) output.append(4, static_cast(0)); bytes_to_go -= wr_bytes; } break; @@ -898,7 +893,7 @@ void _vl_vsformat(std::string& output, const char* formatp, va_list ap) VL_MT_SA static inline bool _vl_vsss_eof(FILE* fp, int floc) VL_MT_SAFE { if (fp) { - return feof(fp) ? 1 : 0; // 1:0 to prevent MSVC++ warning + return feof(fp) ? true : false; // true : false to prevent MSVC++ warning } else { return floc < 0; } @@ -1076,7 +1071,7 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf _vl_vsss_skipspace(fp, floc, fromp, fstr); _vl_vsss_read_str(fp, floc, fromp, fstr, tmp, "0123456789+-xXzZ?_"); if (!tmp[0]) goto done; - vlsint64_t ld; + vlsint64_t ld = 0; sscanf(tmp, "%30" VL_PRI64 "d", &ld); VL_SET_WQ(owp, ld); break; @@ -1101,7 +1096,7 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf _vl_vsss_skipspace(fp, floc, fromp, fstr); _vl_vsss_read_str(fp, floc, fromp, fstr, tmp, "0123456789+-xXzZ?_"); if (!tmp[0]) goto done; - QData ld; + QData ld = 0; sscanf(tmp, "%30" VL_PRI64 "u", &ld); VL_SET_WQ(owp, ld); break; @@ -1216,7 +1211,7 @@ void _VL_STRING_TO_VINT(int obits, void* destp, size_t srclen, const char* srcp) size_t bytes = VL_BYTES_I(obits); char* op = reinterpret_cast(destp); if (srclen > bytes) srclen = bytes; // Don't overflow destination - size_t i; + size_t i = 0; for (i = 0; i < srclen; ++i) { *op++ = srcp[srclen - 1 - i]; } for (; i < bytes; ++i) { *op++ = 0; } } @@ -1522,36 +1517,38 @@ IData VL_VALUEPLUSARGS_INW(int rbits, const std::string& ld, WDataOutP rwp) VL_M VL_ZERO_RESET_W(rbits, rwp); switch (tolower(fmt)) { - case 'd': - vlsint64_t lld; + case 'd': { + vlsint64_t lld = 0; sscanf(dp, "%30" VL_PRI64 "d", &lld); VL_SET_WQ(rwp, lld); break; + } case 'b': _vl_vsss_based(rwp, rbits, 1, dp, 0, strlen(dp)); break; case 'o': _vl_vsss_based(rwp, rbits, 3, dp, 0, strlen(dp)); break; case 'h': // FALLTHRU case 'x': _vl_vsss_based(rwp, rbits, 4, dp, 0, strlen(dp)); break; - case 's': // string/no conversion + case 's': { // string/no conversion for (int i = 0, lsb = 0, posp = static_cast(strlen(dp)) - 1; i < rbits && posp >= 0; --posp) { _vl_vsss_setbit(rwp, rbits, lsb, 8, dp[posp]); lsb += 8; } break; + } case 'e': { - double temp = 0.f; + double temp = 0.F; sscanf(dp, "%le", &temp); VL_SET_WQ(rwp, VL_CVT_Q_D(temp)); break; } case 'f': { - double temp = 0.f; + double temp = 0.F; sscanf(dp, "%lf", &temp); VL_SET_WQ(rwp, VL_CVT_Q_D(temp)); break; } case 'g': { - double temp = 0.f; + double temp = 0.F; sscanf(dp, "%lg", &temp); VL_SET_WQ(rwp, VL_CVT_Q_D(temp)); break; @@ -1799,7 +1796,7 @@ bool VlReadMem::get(QData& addrr, std::string& valuer) { m_addr = (m_addr << 4) + value; } else { indata = true; - valuer += c; + valuer += static_cast(c); // printf(" Value width=%d @%x = %c\n", width, m_addr, c); if (VL_UNLIKELY(value > 1 && !m_hex)) { VL_FATAL_MT(m_filename.c_str(), m_linenum, "", @@ -1944,7 +1941,7 @@ void VL_READMEM_N(bool hex, // Hex format, else binary VlReadMem rmem(hex, bits, filename, start, end); if (VL_UNLIKELY(!rmem.isOpen())) return; while (true) { - QData addr; + QData addr = 0; std::string value; if (rmem.get(addr /*ref*/, value /*ref*/)) { if (VL_UNLIKELY(addr < static_cast(array_lsb) @@ -2528,7 +2525,7 @@ VerilatedScope::~VerilatedScope() { void VerilatedScope::configure(VerilatedSyms* symsp, const char* prefixp, const char* suffixp, const char* identifier, vlsint8_t timeunit, - const Type type) VL_MT_UNSAFE { + const Type& type) VL_MT_UNSAFE { // Slowpath - called once/scope at construction // We don't want the space and reference-count access overhead of strings. m_symsp = symsp; diff --git a/include/verilated.h b/include/verilated.h index d2bf59ebd..5e25d2f35 100644 --- a/include/verilated.h +++ b/include/verilated.h @@ -337,7 +337,7 @@ public: // But internals only - called from VerilatedModule's VerilatedScope(); ~VerilatedScope(); void configure(VerilatedSyms* symsp, const char* prefixp, const char* suffixp, - const char* identifier, vlsint8_t timeunit, const Type type) VL_MT_UNSAFE; + const char* identifier, vlsint8_t timeunit, const Type& type) VL_MT_UNSAFE; void exportInsert(int finalize, const char* namep, void* cb) VL_MT_UNSAFE; void varInsert(int finalize, const char* namep, void* datap, VerilatedVarType vltype, int vlflags, int dims, ...) VL_MT_UNSAFE; @@ -365,7 +365,7 @@ public: // But internals only - called from VerilatedModule's class VerilatedHierarchy { public: - void add(VerilatedScope* fromp, VerilatedScope* top); + static void add(VerilatedScope* fromp, VerilatedScope* top); }; //=========================================================================== @@ -1909,7 +1909,8 @@ static inline IData VL_STREAML_FAST_III(int, int lbits, int, IData ld, IData rd_ case 1: ret = ((ret >> 2) & VL_UL(0x33333333)) | ((ret & VL_UL(0x33333333)) << 2); // FALLTHRU case 2: ret = ((ret >> 4) & VL_UL(0x0f0f0f0f)) | ((ret & VL_UL(0x0f0f0f0f)) << 4); // FALLTHRU case 3: ret = ((ret >> 8) & VL_UL(0x00ff00ff)) | ((ret & VL_UL(0x00ff00ff)) << 8); // FALLTHRU - case 4: ret = ((ret >> 16) | (ret << 16)); + case 4: ret = ((ret >> 16) | (ret << 16)); // FALLTHRU + default:; } return ret >> (VL_IDATASIZE - lbits); } @@ -1939,7 +1940,8 @@ static inline QData VL_STREAML_FAST_QQI(int, int lbits, int, QData ld, IData rd_ case 4: ret = (((ret >> 16) & 0x0000ffff0000ffffULL) | ((ret & 0x0000ffff0000ffffULL) << 16)); // FALLTHRU - case 5: ret = ((ret >> 32) | (ret << 32)); + case 5: ret = ((ret >> 32) | (ret << 32)); // FALLTHRU + default:; } return ret >> (VL_QUADSIZE - lbits); } diff --git a/include/verilated_cov.cpp b/include/verilated_cov.cpp index ba9dc9b8e..d09aed228 100644 --- a/include/verilated_cov.cpp +++ b/include/verilated_cov.cpp @@ -94,7 +94,6 @@ private: typedef std::map IndexValueMap; typedef std::deque ItemList; -private: // MEMBERS VerilatedMutex m_mutex; ///< Protects all members ValueIndexMap m_valueIndexes VL_GUARDED_BY(m_mutex); ///< Unique arbitrary value for values diff --git a/include/verilated_fst_c.cpp b/include/verilated_fst_c.cpp index fd7ac796c..6cc3e20de 100644 --- a/include/verilated_fst_c.cpp +++ b/include/verilated_fst_c.cpp @@ -136,7 +136,8 @@ void VerilatedFst::declare(vluint32_t code, const char* name, int dtypenum, fstV std::pair p = m_code2symbol.insert(std::make_pair(code, static_cast(NULL))); std::istringstream nameiss(name); - std::istream_iterator beg(nameiss), end; + std::istream_iterator beg(nameiss); + std::istream_iterator end; std::list tokens(beg, end); // Split name std::string symbol_name(tokens.back()); tokens.pop_back(); // Remove symbol name from hierarchy diff --git a/include/verilated_trace_imp.cpp b/include/verilated_trace_imp.cpp index c8a64bba8..507b3b3ab 100644 --- a/include/verilated_trace_imp.cpp +++ b/include/verilated_trace_imp.cpp @@ -39,7 +39,7 @@ // Static utility functions static double timescaleToDouble(const char* unitp) { - char* endp; + char* endp = NULL; double value = strtod(unitp, &endp); // On error so we allow just "ns" to return 1e-9. if (value == 0.0 && endp == unitp) value = 1; diff --git a/include/verilated_unordered_set_map.h b/include/verilated_unordered_set_map.h index 3b2f9f7a3..f66a2bec6 100644 --- a/include/verilated_unordered_set_map.h +++ b/include/verilated_unordered_set_map.h @@ -31,8 +31,8 @@ // //************************************************************************* -#ifndef _V3_UNORDERED_SET_MAP_H_ -#define _V3_UNORDERED_SET_MAP_H_ +#ifndef _VERILATED_UNORDERED_SET_MAP_H_ +#define _VERILATED_UNORDERED_SET_MAP_H_ #include "verilatedos.h" diff --git a/include/verilated_vpi.cpp b/include/verilated_vpi.cpp index 73afdae2d..602347eb1 100644 --- a/include/verilated_vpi.cpp +++ b/include/verilated_vpi.cpp @@ -376,8 +376,8 @@ struct VerilatedVpiTimedCbsCmp { /// Ordering sets keyed by time, then callback descriptor bool operator()(const std::pair& a, const std::pair& b) const { - if (a.first < b.first) return 1; - if (a.first > b.first) return 0; + if (a.first < b.first) return true; + if (a.first > b.first) return false; return a.second < b.second; } }; @@ -939,7 +939,7 @@ const char* VerilatedVpiError::strFromVpiProp(PLI_INT32 vpiVal) VL_MT_SAFE { } #define CHECK_RESULT_CSTR(got, exp) \ - if (strcmp((got), (exp))) { \ + if (0 != strcmp((got), (exp))) { \ std::string msg \ = std::string("%Error: ") + "GOT = '" + got + "'" + " EXP = '" + exp + "'"; \ VL_FATAL_MT(__FILE__, __LINE__, "", msg.c_str()); \ @@ -2079,10 +2079,12 @@ PLI_INT32 vpi_control(PLI_INT32 operation, ...) { VL_STOP_MT("", 0, "*VPI*"); return 1; } + default: { + _VL_VPI_WARNING(__FILE__, __LINE__, "%s: Unsupported type %s, ignoring", VL_FUNC, + VerilatedVpiError::strFromVpiProp(operation)); + return 0; + } } - _VL_VPI_WARNING(__FILE__, __LINE__, "%s: Unsupported type %s, ignoring", VL_FUNC, - VerilatedVpiError::strFromVpiProp(operation)); - return 0; } vpiHandle vpi_handle_by_multi_index(vpiHandle /*obj*/, PLI_INT32 /*num_index*/, diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index 6db1ce188..31d0b892d 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -726,7 +726,7 @@ void AstNode::deleteNode() { this->m_op4p = reinterpret_cast(0x1); if ( #if !defined(VL_DEBUG) || defined(VL_LEAK_CHECKS) - 1 + true #else !v3Global.opt.debugLeak() #endif diff --git a/src/V3Ast.h b/src/V3Ast.h index 1e513999e..c2ab16559 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -1100,11 +1100,11 @@ public: explicit VNUser(void* p) { m_u.up = p; } ~VNUser() {} // Casters - WidthVP* c() { return ((WidthVP*)m_u.up); } - VSymEnt* toSymEnt() { return ((VSymEnt*)m_u.up); } - AstNode* toNodep() { return ((AstNode*)m_u.up); } - V3GraphVertex* toGraphVertex() { return ((V3GraphVertex*)m_u.up); } - inline int toInt() { return m_u.ui; } + WidthVP* c() const { return reinterpret_cast(m_u.up); } + VSymEnt* toSymEnt() const { return reinterpret_cast(m_u.up); } + AstNode* toNodep() const { return reinterpret_cast(m_u.up); } + V3GraphVertex* toGraphVertex() const { return reinterpret_cast(m_u.up); } + int toInt() const { return m_u.ui; } static inline VNUser fromInt(int i) { return VNUser(i); } }; @@ -1310,7 +1310,7 @@ public: class FullValue {}; // for creator type-overload selection explicit V3Hash(Illegal) { m_both = 0; } // Saving and restoring inside a userp - explicit V3Hash(VNUser u) { m_both = u.toInt(); } + explicit V3Hash(const VNUser& u) { m_both = u.toInt(); } V3Hash operator+=(const V3Hash& rh) { setBoth(depth() + rh.depth(), (hshval() * 31 + rh.hshval())); return *this; @@ -2474,9 +2474,8 @@ public: } // op1 = AstMember list void addMembersp(AstNode* nodep) { addNOp1p(nodep); } bool packed() const { return m_packed; } - bool packedUnsup() const { - return true; - } // packed() but as don't support unpacked, presently all structs + // packed() but as don't support unpacked, presently all structs + static bool packedUnsup() { return true; } void isFourstate(bool flag) { m_isFourstate = flag; } virtual bool isFourstate() const { return m_isFourstate; } void clearCache() { m_members.clear(); } @@ -2485,7 +2484,7 @@ public: MemberNameMap::const_iterator it = m_members.find(name); return (it == m_members.end()) ? NULL : it->second; } - int lsb() const { return 0; } + static int lsb() { return 0; } int msb() const { return dtypep()->width() - 1; } // Packed classes look like arrays VNumRange declRange() const { return VNumRange(msb(), lsb(), false); } }; diff --git a/src/V3AstNodes.h b/src/V3AstNodes.h index f9c9c648a..4f9c1d99a 100644 --- a/src/V3AstNodes.h +++ b/src/V3AstNodes.h @@ -1908,11 +1908,11 @@ public: VDirection declDirection() const { return m_declDirection; } void varType(AstVarType type) { m_varType = type; } void varType2Out() { - m_tristate = 0; + m_tristate = false; m_direction = VDirection::OUTPUT; } void varType2In() { - m_tristate = 0; + m_tristate = false; m_direction = VDirection::INPUT; } AstBasicDTypeKwd declKwd() const { return m_declKwd; } diff --git a/src/V3Cdc.cpp b/src/V3Cdc.cpp index 7c06d6435..e47600fc0 100644 --- a/src/V3Cdc.cpp +++ b/src/V3Cdc.cpp @@ -255,7 +255,7 @@ private: iterateChildren(nodep); m_logicVertexp = NULL; - if (0 && debug() >= 9) { + if (false && debug() >= 9) { UINFO(9, "Trace Logic:\n"); nodep->dumpTree(cout, "-log1: "); } @@ -295,7 +295,7 @@ private: static bool told_file = false; nodep->v3warnCode(code, msg); if (!told_file) { - told_file = 1; + told_file = true; std::cerr << V3Error::msgPrefix() << " See details in " << m_ofFilename << endl; } *m_ofp << "%Warning-" << code.ascii() << ": " << nodep->fileline() << " " << msg << endl; diff --git a/src/V3Combine.cpp b/src/V3Combine.cpp index 45d009a8f..768a94c54 100644 --- a/src/V3Combine.cpp +++ b/src/V3Combine.cpp @@ -345,7 +345,7 @@ private: // Grab statement bodies AstNRelinker relink1Handle; AstNRelinker relink2Handle; - for (AstNode *nextp, *walkp = node1p; 1; walkp = nextp) { + for (AstNode *nextp, *walkp = node1p; true; walkp = nextp) { nextp = walkp->nextp(); if (walkp == node1p) { walkp->unlinkFrBack(&relink1Handle); @@ -355,7 +355,7 @@ private: } if (walkp == last1p) break; } - for (AstNode *nextp, *walkp = node2p; 1; walkp = nextp) { + for (AstNode *nextp, *walkp = node2p; true; walkp = nextp) { nextp = walkp->nextp(); if (walkp == node2p) { walkp->unlinkFrBack(&relink2Handle); diff --git a/src/V3Config.cpp b/src/V3Config.cpp index eca233a8d..4cf88e78b 100644 --- a/src/V3Config.cpp +++ b/src/V3Config.cpp @@ -335,7 +335,7 @@ public: // UINFO(9, " Hit " << *m_lastIt << endl); filelinep->warnOn(m_lastIgnore.it->m_code, m_lastIgnore.it->m_on); } - if (0 && debug() >= 9) { + if (false && debug() >= 9) { for (IgnLines::const_iterator it = m_lastIgnore.it; it != m_ignLines.end(); ++it) { UINFO(9, " NXT " << *it << endl); } diff --git a/src/V3Config.h b/src/V3Config.h index 96346c4f1..dd542192c 100644 --- a/src/V3Config.h +++ b/src/V3Config.h @@ -43,7 +43,7 @@ public: static void applyModule(AstNodeModule* modulep); static void applyFTask(AstNodeModule* modulep, AstNodeFTask* ftaskp); static void applyVarAttr(AstNodeModule* modulep, AstNodeFTask* ftaskp, AstVar* varp); - static bool waive(FileLine* filelinep, V3ErrorCode code, const string& match); + static bool waive(FileLine* filelinep, V3ErrorCode code, const string& message); }; #endif // Guard diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index f64d94a25..d8e0f9799 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -127,7 +127,7 @@ class EmitCSyms : EmitCBaseVisitor { && !(VN_IS(nodep, CFunc) && (VN_CAST(nodep, CFunc)->isConstructor() || VN_CAST(nodep, CFunc)->isDestructor()))) { - string rsvd = m_words.isKeyword(nodep->name()); + string rsvd = V3LanguageWords::isKeyword(nodep->name()); if (rsvd != "") { // Generally V3Name should find all of these and throw SYMRSVDWORD. // We'll still check here because the compiler errors diff --git a/src/V3EmitXml.cpp b/src/V3EmitXml.cpp index 5c91a4625..671410316 100644 --- a/src/V3EmitXml.cpp +++ b/src/V3EmitXml.cpp @@ -58,7 +58,8 @@ class EmitXmlFileVisitor : public AstNVisitor { if (!nodep->user1()) { nodep->user1(++m_id); } puts("\"" + cvtToStr(nodep->user1()) + "\""); } - void outputTag(AstNode* nodep, string tag) { + void outputTag(AstNode* nodep, const string& tagin) { + string tag = tagin; if (tag == "") tag = VString::downcase(nodep->typeName()); puts("<" + tag + " " + nodep->fileline()->xml()); puts(" " + nodep->fileline()->xmlDetailedLocation()); @@ -86,7 +87,8 @@ class EmitXmlFileVisitor : public AstNVisitor { } } } - void outputChildrenEnd(AstNode* nodep, string tag) { + void outputChildrenEnd(AstNode* nodep, const string& tagin) { + string tag = tagin; if (tag == "") tag = VString::downcase(nodep->typeName()); if (nodep->op1p() || nodep->op2p() || nodep->op3p() || nodep->op4p()) { puts(">\n"); diff --git a/src/V3File.cpp b/src/V3File.cpp index fc985a081..e2437ccb9 100644 --- a/src/V3File.cpp +++ b/src/V3File.cpp @@ -644,7 +644,7 @@ V3OutFormatter::V3OutFormatter(const string& filename, V3OutFormatter::Language //---------------------------------------------------------------------- -const string V3OutFormatter::indentSpaces(int num) { +string V3OutFormatter::indentSpaces(int num) { // Indent the specified number of spaces. Use spaces. static char str[MAXSPACE + 20]; char* cp = str; diff --git a/src/V3File.h b/src/V3File.h index dcbb7672e..e98496bc9 100644 --- a/src/V3File.h +++ b/src/V3File.h @@ -165,7 +165,7 @@ public: if (!m_parenVec.empty()) m_parenVec.pop(); } // STATIC METHODS - static const string indentSpaces(int num); + static string indentSpaces(int num); // Add escaped characters to strings static string quoteNameControls(const string& namein, Language lang = LA_C); diff --git a/src/V3FileLine.cpp b/src/V3FileLine.cpp index 1ff759762..4c4559e79 100644 --- a/src/V3FileLine.cpp +++ b/src/V3FileLine.cpp @@ -36,7 +36,7 @@ //###################################################################### // FileLineSingleton class functions -const string FileLineSingleton::filenameLetters(int fileno) { +string FileLineSingleton::filenameLetters(int fileno) { const int size = 1 + (64 / 4); // Each letter retires more than 4 bits of a > 64 bit number char out[size]; char* op = out + size - 1; @@ -165,7 +165,7 @@ void FileLine::newContent() { m_contentLineno = 1; } -const string FileLine::xmlDetailedLocation() const { +string FileLine::xmlDetailedLocation() const { return "loc=\"" + cvtToStr(filenameLetters()) + "," + cvtToStr(firstLineno()) + "," + cvtToStr(firstColumn()) + "," + cvtToStr(lastLineno()) + "," + cvtToStr(lastColumn()) + "\""; @@ -259,27 +259,27 @@ FileLine* FileLine::copyOrSameFileLine() { return newp; } -const string FileLine::filebasename() const { +string FileLine::filebasename() const { string name = filename(); string::size_type pos; if ((pos = name.rfind('/')) != string::npos) name.erase(0, pos + 1); return name; } -const string FileLine::filebasenameNoExt() const { +string FileLine::filebasenameNoExt() const { string name = filebasename(); string::size_type pos; if ((pos = name.find('.')) != string::npos) name = name.substr(0, pos); return name; } -const string FileLine::firstColumnLetters() const { +string FileLine::firstColumnLetters() const { char a = ((firstColumn() / 26) % 26) + 'a'; char b = (firstColumn() % 26) + 'a'; return string(1, a) + string(1, b); } -const string FileLine::profileFuncname() const { +string FileLine::profileFuncname() const { // Return string that is OK as a function name - for profiling string name = filebasenameNoExt(); string::size_type pos; diff --git a/src/V3FileLine.h b/src/V3FileLine.h index 582056e06..579e3cb75 100644 --- a/src/V3FileLine.h +++ b/src/V3FileLine.h @@ -14,8 +14,8 @@ // //************************************************************************* -#ifndef _V3FileLine_H_ -#define _V3FileLine_H_ 1 +#ifndef _V3FILELINE_H_ +#define _V3FILELINE_H_ 1 #include "config_build.h" #include "verilatedos.h" @@ -51,8 +51,8 @@ class FileLineSingleton { protected: friend class FileLine; int nameToNumber(const string& filename); - const string numberToName(int filenameno) const { return m_names[filenameno]; } - const V3LangCode numberToLang(int filenameno) const { return m_languages[filenameno]; } + string numberToName(int filenameno) const { return m_names[filenameno]; } + V3LangCode numberToLang(int filenameno) const { return m_languages[filenameno]; } void numberToLang(int filenameno, const V3LangCode& l) { m_languages[filenameno] = l; } void clear() { m_namemap.clear(); @@ -60,7 +60,7 @@ protected: m_languages.clear(); } void fileNameNumMapDumpXml(std::ostream& os); - static const string filenameLetters(int fileno); + static string filenameLetters(int fileno); }; //! All source lines from a file/stream, to enable errors to show sources @@ -193,19 +193,17 @@ public: string ascii() const; string asciiLineCol() const; int filenameno() const { return m_filenameno; } - const string filename() const { return singleton().numberToName(filenameno()); } + string filename() const { return singleton().numberToName(filenameno()); } bool filenameIsGlobal() const { return (filename() == commandLineFilename() || filename() == builtInFilename()); } - const string filenameLetters() const { return singleton().filenameLetters(filenameno()); } - const string filebasename() const; - const string filebasenameNoExt() const; - const string firstColumnLetters() const; - const string profileFuncname() const; - const string xml() const { - return "fl=\"" + filenameLetters() + cvtToStr(lastLineno()) + "\""; - } - const string xmlDetailedLocation() const; + string filenameLetters() const { return FileLineSingleton::filenameLetters(filenameno()); } + string filebasename() const; + string filebasenameNoExt() const; + string firstColumnLetters() const; + string profileFuncname() const; + string xml() const { return "fl=\"" + filenameLetters() + cvtToStr(lastLineno()) + "\""; } + string xmlDetailedLocation() const; string lineDirectiveStrg(int enterExit) const; // Turn on/off warning messages on this line. diff --git a/src/V3Global.h b/src/V3Global.h index b1b4b9184..4d3c96473 100644 --- a/src/V3Global.h +++ b/src/V3Global.h @@ -88,7 +88,6 @@ public: // Options V3Options opt; // All options; let user see them directly -public: // CONSTRUCTORS V3Global() : m_rootp(NULL) // created by makeInitNetlist() so static constructors run first diff --git a/src/V3GraphAcyc.cpp b/src/V3GraphAcyc.cpp index ca57a82ee..da07309ca 100644 --- a/src/V3GraphAcyc.cpp +++ b/src/V3GraphAcyc.cpp @@ -79,9 +79,9 @@ public: struct GraphAcycEdgeCmp { inline bool operator()(const V3GraphEdge* lhsp, const V3GraphEdge* rhsp) const { - if (lhsp->weight() > rhsp->weight()) return 1; // LHS goes first - if (lhsp->weight() < rhsp->weight()) return 0; // RHS goes first - return 0; + if (lhsp->weight() > rhsp->weight()) return true; // LHS goes first + if (lhsp->weight() < rhsp->weight()) return false; // RHS goes first + return false; } }; diff --git a/src/V3GraphDfa.cpp b/src/V3GraphDfa.cpp index ad0c1ffed..084f628e9 100644 --- a/src/V3GraphDfa.cpp +++ b/src/V3GraphDfa.cpp @@ -193,7 +193,7 @@ private: return NULL; // No match } - void findNfasWithInput(DfaVertex* dfaStatep, DfaInput input, DfaStates& nfasWithInput) { + void findNfasWithInput(DfaVertex* dfaStatep, const DfaInput& input, DfaStates& nfasWithInput) { // Return all NFA states, with the given input transition from // the nfa states a given dfa state was constructed from. nextStep(); diff --git a/src/V3Hashed.cpp b/src/V3Hashed.cpp index 10f1fe7dd..8a3589234 100644 --- a/src/V3Hashed.cpp +++ b/src/V3Hashed.cpp @@ -158,7 +158,7 @@ void V3Hashed::dumpFile(const string& filename, bool tree) { V3Hash lasthash; int num_in_bucket = 0; - for (HashMmap::iterator it = begin(); 1; ++it) { + for (HashMmap::iterator it = begin(); true; ++it) { if (it == end() || lasthash != it->first) { if (it != end()) lasthash = it->first; if (num_in_bucket) { diff --git a/src/V3Name.cpp b/src/V3Name.cpp index bd0e7bb22..008005206 100644 --- a/src/V3Name.cpp +++ b/src/V3Name.cpp @@ -54,7 +54,7 @@ private: nodep->editCountInc(); } else if (VN_IS(nodep, CFunc) && VN_CAST(nodep, CFunc)->isConstructor()) { } else { - string rsvd = m_words.isKeyword(nodep->name()); + string rsvd = V3LanguageWords::isKeyword(nodep->name()); if (rsvd != "") { nodep->v3warn(SYMRSVDWORD, "Symbol matches " + rsvd + ": " << nodep->prettyNameQ()); diff --git a/src/V3Number.cpp b/src/V3Number.cpp index cfa797013..e7b19e4e5 100644 --- a/src/V3Number.cpp +++ b/src/V3Number.cpp @@ -792,7 +792,7 @@ string V3Number::toDecimalU() const { if (bcd.bitsValue(lsb, 4)) break; } for (; lsb >= 0; lsb -= 4) { - output += ('0' + bcd.bitsValue(lsb, 4)); // 0..9 + output += static_cast('0' + bcd.bitsValue(lsb, 4)); // 0..9 } return output; } @@ -946,12 +946,12 @@ bool V3Number::isAnyXZ() const { bool V3Number::isLtXZ(const V3Number& rhs) const { // Include X/Z in comparisons for sort ordering for (int bit = 0; bit < std::max(this->width(), rhs.width()); bit++) { - if (this->bitIs1(bit) && rhs.bitIs0(bit)) { return 1; } - if (rhs.bitIs1(bit) && this->bitIs0(bit)) { return 0; } - if (this->bitIsXZ(bit)) { return 1; } - if (rhs.bitIsXZ(bit)) { return 0; } + if (this->bitIs1(bit) && rhs.bitIs0(bit)) { return true; } + if (rhs.bitIs1(bit) && this->bitIs0(bit)) { return false; } + if (this->bitIsXZ(bit)) { return true; } + if (rhs.bitIsXZ(bit)) { return false; } } - return 0; + return false; } int V3Number::widthMin() const { diff --git a/src/V3Options.h b/src/V3Options.h index 46ea32569..0a4d72f03 100644 --- a/src/V3Options.h +++ b/src/V3Options.h @@ -97,27 +97,43 @@ public: VTimescale(const string& value, bool& badr); VTimescale(double value, bool& badr) { badr = false; - // clang-format off - if (value == 10e2) m_e = TS_100S; - else if (value == 1e1) m_e = TS_10S; - else if (value == 1e0) m_e = TS_1S; - else if (value == 1e-1) m_e = TS_100MS; - else if (value == 1e-2) m_e = TS_10MS; - else if (value == 1e-3) m_e = TS_1MS; - else if (value == 1e-4) m_e = TS_100US; - else if (value == 1e-5) m_e = TS_10US; - else if (value == 1e-6) m_e = TS_1US; - else if (value == 1e-7) m_e = TS_100NS; - else if (value == 1e-8) m_e = TS_10NS; - else if (value == 1e-9) m_e = TS_1NS; - else if (value == 1e-10) m_e = TS_100PS; - else if (value == 1e-11) m_e = TS_10PS; - else if (value == 1e-12) m_e = TS_1PS; - else if (value == 1e-13) m_e = TS_100FS; - else if (value == 1e-14) m_e = TS_10FS; - else if (value == 1e-15) m_e = TS_1FS; - // clang-format on - else { + if (value == 10e2) { + m_e = TS_100S; + } else if (value == 1e1) { + m_e = TS_10S; + } else if (value == 1e0) { + m_e = TS_1S; + } else if (value == 1e-1) { + m_e = TS_100MS; + } else if (value == 1e-2) { + m_e = TS_10MS; + } else if (value == 1e-3) { + m_e = TS_1MS; + } else if (value == 1e-4) { + m_e = TS_100US; + } else if (value == 1e-5) { + m_e = TS_10US; + } else if (value == 1e-6) { + m_e = TS_1US; + } else if (value == 1e-7) { + m_e = TS_100NS; + } else if (value == 1e-8) { + m_e = TS_10NS; + } else if (value == 1e-9) { + m_e = TS_1NS; + } else if (value == 1e-10) { + m_e = TS_100PS; + } else if (value == 1e-11) { + m_e = TS_10PS; + } else if (value == 1e-12) { + m_e = TS_1PS; + } else if (value == 1e-13) { + m_e = TS_100FS; + } else if (value == 1e-14) { + m_e = TS_10FS; + } else if (value == 1e-15) { + m_e = TS_1FS; + } else { m_e = NONE; badr = true; } @@ -132,7 +148,7 @@ public: "10ns", "1ns", "100ps", "10ps", "1ps", "100fs", "10fs", "1fs", "NONE"}; return names[m_e]; } - int powerOfTen() { return 2 - static_cast(m_e); } + int powerOfTen() const { return 2 - static_cast(m_e); } double multiplier() const { static const double values[] = {100, 10, 1, 1e-1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6, 1e-7, diff --git a/src/V3Order.cpp b/src/V3Order.cpp index fc6c9e4dc..eb8b9a593 100644 --- a/src/V3Order.cpp +++ b/src/V3Order.cpp @@ -1342,7 +1342,7 @@ void OrderVisitor::processInputs() { void OrderVisitor::processInputsInIterate(OrderEitherVertex* vertexp, VertexVec& todoVec) { // Propagate PrimaryIn through simple assignments if (vertexp->user()) return; // Already processed - if (0 && debug() >= 9) { + if (false && debug() >= 9) { UINFO(9, " InIIter " << vertexp << endl); if (OrderLogicVertex* vvertexp = dynamic_cast(vertexp)) { vvertexp->nodep()->dumpTree(cout, "- TT: "); @@ -2011,7 +2011,7 @@ void OrderVisitor::process() { // Dump data m_graph.dumpDotFilePrefixed("orderg_done"); - if (0 && debug()) { + if (false && debug()) { string dfilename = v3Global.opt.makeDir() + "/" + v3Global.opt.prefix() + "_INT_order"; const vl_unique_ptr logp(V3File::new_ofstream(dfilename)); if (logp->fail()) v3fatal("Can't write " << dfilename); diff --git a/src/V3ParseImp.cpp b/src/V3ParseImp.cpp index 510d32047..d095e5234 100644 --- a/src/V3ParseImp.cpp +++ b/src/V3ParseImp.cpp @@ -164,8 +164,8 @@ void V3ParseImp::errorPreprocDirective(const char* textp) { // Find all `preprocessor spelling candidates // Can't make this static as might get more defines later when read cells VSpellCheck speller; - V3LanguageWords words; - for (V3LanguageWords::const_iterator it = words.begin(); it != words.end(); ++it) { + for (V3LanguageWords::const_iterator it = V3LanguageWords::begin(); + it != V3LanguageWords::end(); ++it) { string ppDirective = it->first; if (ppDirective[0] == '`') speller.pushCandidate(ppDirective); } diff --git a/src/V3ParseImp.h b/src/V3ParseImp.h index 4a89eff8a..3441cc1c4 100644 --- a/src/V3ParseImp.h +++ b/src/V3ParseImp.h @@ -228,10 +228,10 @@ public: void lexNew(); void lexDestroy(); static int stateVerilogRecent(); // Parser -> lexer communication - int prevLexToken() { return m_prevLexToken; } // Parser -> lexer communication + int prevLexToken() const { return m_prevLexToken; } // Parser -> lexer communication size_t flexPpInputToLex(char* buf, size_t max_size) { return ppInputToLex(buf, max_size); } - const V3ParseBisonYYSType curBisonVal() const { return m_curBisonVal; } - const V3ParseBisonYYSType prevBisonVal() const { return m_prevBisonVal; } + V3ParseBisonYYSType curBisonVal() const { return m_curBisonVal; } + V3ParseBisonYYSType prevBisonVal() const { return m_prevBisonVal; } //==== Symbol tables V3ParseSym* symp() { return m_symp; } diff --git a/src/V3ParseSym.h b/src/V3ParseSym.h index d8c39b7d7..dbe9bebc5 100644 --- a/src/V3ParseSym.h +++ b/src/V3ParseSym.h @@ -129,7 +129,7 @@ public: UINFO(1, "ParseSym Current: " << symCurrentp()->nodep() << endl); } void dump(std::ostream& os, const string& indent = "") { m_syms.dump(os, indent); } - AstNode* findEntUpward(const string& name) { + AstNode* findEntUpward(const string& name) const { // Lookup the given string as an identifier, return type of the id, scanning upward VSymEnt* foundp = symCurrentp()->findIdFallback(name); if (foundp) { diff --git a/src/V3PreLex.h b/src/V3PreLex.h index 95cc114b1..71e684412 100644 --- a/src/V3PreLex.h +++ b/src/V3PreLex.h @@ -18,8 +18,8 @@ // It is not intended for user applications. //************************************************************************* -#ifndef _VPREPROCLEX_H_ // Guard -#define _VPREPROCLEX_H_ 1 +#ifndef _VPRELEX_H_ // Guard +#define _VPRELEX_H_ 1 #include "V3Error.h" #include "V3FileLine.h" diff --git a/src/V3PreProc.cpp b/src/V3PreProc.cpp index d4595131e..de42e8c02 100644 --- a/src/V3PreProc.cpp +++ b/src/V3PreProc.cpp @@ -286,9 +286,9 @@ public: m_finFilelinep->lineno(1); // Create lexer m_lexp = new V3PreLex(this, filelinep); - m_lexp->m_keepComments = m_preprocp->keepComments(); - m_lexp->m_keepWhitespace = m_preprocp->keepWhitespace(); - m_lexp->m_pedantic = m_preprocp->pedantic(); + m_lexp->m_keepComments = keepComments(); + m_lexp->m_keepWhitespace = keepWhitespace(); + m_lexp->m_pedantic = pedantic(); m_lexp->debug(debug() >= 5 ? debug() : 0); // See also V3PreProc::debug() method } ~V3PreProcImp() { @@ -1527,7 +1527,7 @@ int V3PreProcImp::getFinalToken(string& buf) { } int tok = m_finToken; buf = m_finBuf; - if (0 && debug() >= 5) { + if (false && debug() >= 5) { string bufcln = V3PreLex::cleanDbgStrg(buf); string flcol = m_lexp->m_tokFilelinep->asciiLineCol(); fprintf(stderr, "%s: FIN: %-10s: %s\n", flcol.c_str(), tokenName(tok), diff --git a/src/V3Simulate.h b/src/V3Simulate.h index a5480a342..d7cedc099 100644 --- a/src/V3Simulate.h +++ b/src/V3Simulate.h @@ -350,7 +350,7 @@ private: } } - AstNode* varOrScope(AstVarRef* nodep) { + AstNode* varOrScope(AstVarRef* nodep) const { AstNode* vscp; if (m_scoped) { vscp = nodep->varScopep(); diff --git a/src/V3Stats.h b/src/V3Stats.h index b383f21da..e43ee539a 100644 --- a/src/V3Stats.h +++ b/src/V3Stats.h @@ -36,29 +36,29 @@ public: ~VDouble0() {} // Implicit conversion operators: - inline explicit VDouble0(const vluint64_t v) + explicit VDouble0(const vluint64_t v) : m_d(v) {} - inline operator double() const { return m_d; } + operator double() const { return m_d; } // Explicit operators: - inline VDouble0& operator++() { // prefix + VDouble0& operator++() { // prefix ++m_d; return *this; } - inline VDouble0 operator++(int) { // postfix + VDouble0 operator++(int) { // postfix VDouble0 old = *this; m_d++; return old; } - inline VDouble0& operator=(const double v) { + VDouble0& operator=(const double v) { m_d = v; return *this; } - inline VDouble0& operator+=(const double v) { + VDouble0& operator+=(const double v) { m_d += v; return *this; } - inline VDouble0& operator-=(const double v) { + VDouble0& operator-=(const double v) { m_d -= v; return *this; } diff --git a/src/V3SymTable.h b/src/V3SymTable.h index 9906d9d23..10dd2f439 100644 --- a/src/V3SymTable.h +++ b/src/V3SymTable.h @@ -14,8 +14,8 @@ // //************************************************************************* -#ifndef _V3LINKSYMTABLE_H_ -#define _V3LINKSYMTABLE_H_ 1 +#ifndef _V3SYMTABLE_H_ +#define _V3SYMTABLE_H_ 1 #include "config_build.h" #include "verilatedos.h" @@ -189,7 +189,7 @@ private: reinsert(name, symp); } } - void exportOneSymbol(VSymGraph* graphp, const string& name, const VSymEnt* srcp) { + void exportOneSymbol(VSymGraph* graphp, const string& name, const VSymEnt* srcp) const { if (srcp->exported()) { if (VSymEnt* symp = findIdFlat(name)) { // Should already exist in current table if (!symp->exported()) symp->exported(true); @@ -283,7 +283,6 @@ public: for (SymStack::iterator it = m_symsp.begin(); it != m_symsp.end(); ++it) delete (*it); } -public: // METHODS VSymEnt* rootp() const { return m_symRootp; } // Debug diff --git a/src/V3Trace.cpp b/src/V3Trace.cpp index 232a723ef..e1fd88052 100644 --- a/src/V3Trace.cpp +++ b/src/V3Trace.cpp @@ -375,7 +375,8 @@ private: // Sort the traces by activity sets TraceVec traces; - uint32_t unused1, unused2; + uint32_t unused1; + uint32_t unused2; sortTraces(traces, unused1, unused2); // For each activity set with only a small number of signals, make those diff --git a/src/VlcBucket.h b/src/VlcBucket.h index b486aa3af..b422c9e95 100644 --- a/src/VlcBucket.h +++ b/src/VlcBucket.h @@ -32,7 +32,6 @@ private: vluint64_t m_dataSize; ///< Current entries in m_datap vluint64_t m_bucketsCovered; ///< Num buckets with sufficient coverage -private: static inline vluint64_t covBit(vluint64_t point) { return 1ULL << (point & 63); } inline vluint64_t allocSize() const { return sizeof(vluint64_t) * m_dataSize / 64; } void allocate(vluint64_t point) { diff --git a/src/VlcPoint.h b/src/VlcPoint.h index 0cd57317e..09e059ab7 100644 --- a/src/VlcPoint.h +++ b/src/VlcPoint.h @@ -108,7 +108,6 @@ public: ByName::iterator begin() { return m_nameMap.begin(); } ByName::iterator end() { return m_nameMap.end(); } -public: // CONSTRUCTORS VlcPoints() : m_numPoints(0) {} diff --git a/src/VlcSource.h b/src/VlcSource.h index f01a575a7..9e438d9b2 100644 --- a/src/VlcSource.h +++ b/src/VlcSource.h @@ -118,7 +118,6 @@ public: NameMap::iterator begin() { return m_sources.begin(); } NameMap::iterator end() { return m_sources.end(); } -public: // CONSTRUCTORS VlcSources() {} ~VlcSources() {} diff --git a/src/VlcTest.h b/src/VlcTest.h index 99fede10e..dd0a6ccea 100644 --- a/src/VlcTest.h +++ b/src/VlcTest.h @@ -103,7 +103,6 @@ public: ByName::iterator begin() { return m_tests.begin(); } ByName::iterator end() { return m_tests.end(); } -public: // CONSTRUCTORS VlcTests() {} ~VlcTests() {