From 9fe2af2be1ca108e5bc2f08a456421031a743094 Mon Sep 17 00:00:00 2001 From: couriersud Date: Thu, 31 Oct 2019 22:07:50 +0100 Subject: [PATCH] netlist: fix clang warnings & srcclean. (nw) --- src/lib/netlist/nl_base.h | 2 +- src/lib/netlist/nl_config.h | 4 ++-- src/lib/netlist/plib/pfunction.cpp | 6 +++--- src/lib/netlist/plib/pfunction.h | 4 ++-- src/lib/netlist/plib/plists.h | 18 +++++++++--------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 1063690894f..aed0661d8d7 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -362,7 +362,7 @@ namespace netlist template state_container(O &owner, //!< owner must have a netlist() method. const pstring &name, //!< identifier/name for this state variable - std::size_t n, //!< number of elements to allocate + std::size_t n, //!< number of elements to allocate const value_type &value //!< Initial value after construction ); //! Copy Constructor. diff --git a/src/lib/netlist/nl_config.h b/src/lib/netlist/nl_config.h index a73caf5cbce..45b3e50fc46 100644 --- a/src/lib/netlist/nl_config.h +++ b/src/lib/netlist/nl_config.h @@ -139,8 +139,8 @@ namespace netlist static constexpr const float DIODE_MAXDIFF = 1e5; static constexpr const float DIODE_MAXVOLT = 30.0; - static constexpr const float TIMESTEP_MAXDIFF = 1e30; - static constexpr const float TIMESTEP_MINDIV = 1e-8; + static constexpr const float TIMESTEP_MAXDIFF = 1e30f; + static constexpr const float TIMESTEP_MINDIV = 1e-8f; }; } // namespace netlist diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp index 44254706636..3a1c2962169 100644 --- a/src/lib/netlist/plib/pfunction.cpp +++ b/src/lib/netlist/plib/pfunction.cpp @@ -67,7 +67,7 @@ namespace plib { if (inputs[i] == cmd) { rc.m_cmd = PUSH_INPUT; - rc.m_param = static_cast(i); + rc.m_param = static_cast(i); stk += 1; break; } @@ -224,7 +224,7 @@ namespace plib { return stack[ptr-1]; } - template struct pfunction; - template struct pfunction; + template class pfunction; + template class pfunction; } // namespace plib diff --git a/src/lib/netlist/plib/pfunction.h b/src/lib/netlist/plib/pfunction.h index 31ff9475fae..3f9c7ddc861 100644 --- a/src/lib/netlist/plib/pfunction.h +++ b/src/lib/netlist/plib/pfunction.h @@ -114,8 +114,8 @@ namespace plib { std::uint16_t m_lfsr; //!< lfsr used for generating random numbers }; - extern template struct pfunction; - extern template struct pfunction; + extern template class pfunction; + extern template class pfunction; } // namespace plib diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h index 7a9e0cb0edb..475e023330d 100644 --- a/src/lib/netlist/plib/plists.h +++ b/src/lib/netlist/plib/plists.h @@ -35,16 +35,16 @@ namespace plib { { public: - typedef C value_type; - typedef value_type* pointer; + typedef C value_type; + typedef value_type* pointer; typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef value_type* iterator; - typedef const value_type* const_iterator; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef std::reverse_iterator reverse_iterator; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* iterator; + typedef const value_type* const_iterator; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; //uninitialised_array_t() noexcept = default;