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 "plib/palloc.h"
#include "plib/pfmtlog.h"
#include "plib/pmempool.h"
#include "plib/putil.h"
#include "plib/pfmtlog.h"
#include "devices/nlid_proxy.h"
#include "devices/nlid_system.h"

View file

@ -149,7 +149,7 @@
/// | 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
///

View file

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

View file

@ -156,7 +156,7 @@ namespace plib {
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 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)
{
pstring r(plib::replace_all(plib::replace_all(plib::replace_all(s, "+", ""), ".", "_"), "@",""));
if (plib::startsWith(s, "+"))
vs += ", p" + r;
else if (plib::startsWith(s, "@"))
if (!plib::startsWith(s, "@"))
{
// automatically connected
//mac_out("\tNET_CONNECT(name, " + r + ", " + r + ")");
}
else
// @ gets automatically connected
const pstring r(plib::replace_all(plib::replace_all(plib::replace_all(s, "+", ""), ".", "_"), "@",""));
vs += ", p" + r;
}
}
mac_out("\tNET_REGISTER_DEVEXT(" + e->name() +", name" + vs + ")", false);