netlist: clang tidy fixes. (nw)

This commit is contained in:
couriersud 2020-01-19 20:56:53 +01:00
parent b4e8244827
commit 0f69abe4dc
5 changed files with 8 additions and 12 deletions

View File

@ -5,9 +5,9 @@
#include "solver/nld_solver.h" #include "solver/nld_solver.h"
#include "plib/palloc.h" #include "plib/palloc.h"
#include "plib/pfmtlog.h"
#include "plib/pmempool.h" #include "plib/pmempool.h"
#include "plib/putil.h" #include "plib/putil.h"
#include "plib/pfmtlog.h"
#include "devices/nlid_proxy.h" #include "devices/nlid_proxy.h"
#include "devices/nlid_system.h" #include "devices/nlid_system.h"

View File

@ -149,7 +149,7 @@
/// | 63 | 1,000,000,000,000 | 9,223,372 | 107| 0.3 | /// | 63 | 1,000,000,000,000 | 9,223,372 | 107| 0.3 |
/// ///
static constexpr const auto NETLIST_INTERNAL_RES = 10'000'000'000ll; static constexpr const auto NETLIST_INTERNAL_RES = 10'000'000'000LL;
/// \brief Recommended clock to be used /// \brief Recommended clock to be used
/// ///

View File

@ -9,9 +9,9 @@
/// ///
#include "pconfig.h" #include "pconfig.h"
#include "pmath.h"
#include "pstring.h" #include "pstring.h"
#include "ptypes.h" #include "ptypes.h"
#include "pmath.h"
#include <cstddef> // for std::max_align_t (usually long long) #include <cstddef> // for std::max_align_t (usually long long)
#include <memory> #include <memory>

View File

@ -156,7 +156,7 @@ namespace plib {
C14CONSTEXPR LC* operator->() const noexcept { return p; } C14CONSTEXPR LC* operator->() const noexcept { return p; }
}; };
constexpr linkedlist_t() : m_head(nullptr) {} constexpr linkedlist_t() noexcept : m_head(nullptr) {}
constexpr iter_t begin() const noexcept { return iter_t(m_head); } constexpr iter_t begin() const noexcept { return iter_t(m_head); }
constexpr iter_t end() const noexcept { return iter_t(nullptr); } constexpr iter_t end() const noexcept { return iter_t(nullptr); }

View File

@ -675,16 +675,12 @@ void tool_app_t::header_entry(const netlist::factory::element_t *e)
for (const auto &s : v) for (const auto &s : v)
{ {
pstring r(plib::replace_all(plib::replace_all(plib::replace_all(s, "+", ""), ".", "_"), "@","")); if (!plib::startsWith(s, "@"))
if (plib::startsWith(s, "+"))
vs += ", p" + r;
else if (plib::startsWith(s, "@"))
{ {
// automatically connected // @ gets automatically connected
//mac_out("\tNET_CONNECT(name, " + r + ", " + r + ")"); const pstring r(plib::replace_all(plib::replace_all(plib::replace_all(s, "+", ""), ".", "_"), "@",""));
}
else
vs += ", p" + r; vs += ", p" + r;
}
} }
mac_out("\tNET_REGISTER_DEVEXT(" + e->name() +", name" + vs + ")", false); mac_out("\tNET_REGISTER_DEVEXT(" + e->name() +", name" + vs + ")", false);