summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
authorGravatarGravatar couriersud <couriersud@gmx.org>2019-10-31 22:07:50 +0100
committerGravatarGravatar couriersud <couriersud@gmx.org>2019-10-31 22:07:50 +0100
commit9fe2af2be1ca108e5bc2f08a456421031a743094 (patch)
treedede9451f858a5f71724ac3037ed925ed7a9bbf5 /src/lib
parentc6b281685d16c02b83b1b0c89acae392ecf851ff (diff)
netlist: fix clang warnings & srcclean. (nw)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/netlist/nl_base.h2
-rw-r--r--src/lib/netlist/nl_config.h4
-rw-r--r--src/lib/netlist/plib/pfunction.cpp6
-rw-r--r--src/lib/netlist/plib/pfunction.h4
-rw-r--r--src/lib/netlist/plib/plists.h18
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 <typename O>
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<double>(i);
+ rc.m_param = static_cast<NT>(i);
stk += 1;
break;
}
@@ -224,7 +224,7 @@ namespace plib {
return stack[ptr-1];
}
- template struct pfunction<float>;
- template struct pfunction<double>;
+ template class pfunction<float>;
+ template class pfunction<double>;
} // 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<float>;
- extern template struct pfunction<double>;
+ extern template class pfunction<float>;
+ extern template class pfunction<double>;
} // 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<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<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
//uninitialised_array_t() noexcept = default;