summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/palloc.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-07-01 20:59:04 +0200
committer couriersud <couriersud@gmx.org>2020-07-01 20:59:04 +0200
commit319be2dfd271ebf81ba3cf651be0b30695ec0d06 (patch)
tree08d9d10c35c10a495412292f628d41a82ed1873b /src/lib/netlist/plib/palloc.h
parent51ba9b48f08202939d06240eaa1dcfc7dfbd7c1c (diff)
netlist: code maintenance and bug fixes.
* palloc.h/pmatrix2d.h: Fix static_assert warnings at the origin. * Rework hints to broaden their use and fix NC hint. * 74377: use NC hint * plists.h: Fix debugging in MSVC * Include cleanup: Move everything not needed by netlists from nl_setup.h into core/setup.h * Fix some clang tidy warnings * srcclean
Diffstat (limited to 'src/lib/netlist/plib/palloc.h')
-rw-r--r--src/lib/netlist/plib/palloc.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h
index e1ad17637fe..d082efc5d41 100644
--- a/src/lib/netlist/plib/palloc.h
+++ b/src/lib/netlist/plib/palloc.h
@@ -241,7 +241,7 @@ namespace plib {
public:
using value_type = T;
using pointer = T *;
- static /*constexpr*/ const std::size_t align_size = (ALIGN < 16) ? 16 : ALIGN;
+ static /*constexpr*/ const std::size_t align_size = ALIGN;
using arena_type = ARENA;
static_assert(align_size >= alignof(T),
@@ -438,12 +438,13 @@ namespace plib {
//unused_var(size);
dec_alloc_stat(size);
#if (PUSE_ALIGNED_ALLOCATION)
- #if defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
+ #if defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
+ // NOLINTNEXTLINE(cppcoreguidelines-no-malloc)
_aligned_free(ptr);
- #else
- // NOLINTNEXTLINE(cppcoreguidelines-no-malloc)
+ #else
+ // NOLINTNEXTLINE(cppcoreguidelines-no-malloc)
::free(ptr);
- #endif
+ #endif
#else
::operator delete(ptr);
#endif