summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/palloc.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-11-08 23:52:14 +0100
committer couriersud <couriersud@gmx.org>2019-11-08 23:52:14 +0100
commit88f702b416ba9eb930e6c1e932124d5f24b1a24c (patch)
tree955f3047b79156d7b2bbab55fcbd4fbc94661f1d /src/lib/netlist/plib/palloc.h
parent731c4fe52073a7a7561bf04559e9f0b3b791388d (diff)
netlist: code maintenance and bug fixes. (nw)
- comment style migration continues. - Fixed a two bugs in the truthtable ignore inputs code - refactored the truthtable code a bit for better readability. - updated netlist specific gitignore.
Diffstat (limited to 'src/lib/netlist/plib/palloc.h')
-rw-r--r--src/lib/netlist/plib/palloc.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h
index 2873d5a0be9..8b83a1970d6 100644
--- a/src/lib/netlist/plib/palloc.h
+++ b/src/lib/netlist/plib/palloc.h
@@ -1,13 +1,13 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * palloc.h
- *
- */
#ifndef PALLOC_H_
#define PALLOC_H_
+///
+/// \file palloc.h
+///
+
#include "pconfig.h"
#include "pstring.h"
#include "ptypes.h"
@@ -59,9 +59,9 @@ namespace plib {
std::enable_if<std::is_convertible< U*, T*>::value>::type>
arena_deleter(const arena_deleter<PU, U> &rhs) : m_a(rhs.m_a) { }
#endif
- void operator()(T *p) noexcept //const
+ void operator()(T *p) noexcept
{
- /* call destructor */
+ // call destructor
p->~T();
getref(m_a).deallocate(p);
}
@@ -156,9 +156,9 @@ namespace plib {
m_ptr = nullptr;
}
- /**
- * \brief Return @c true if the stored pointer is not null.
- */
+ ///
+ /// \brief Return \c true if the stored pointer is not null.
+ ///
explicit operator bool() const noexcept { return m_ptr != nullptr; }
pointer release()
@@ -349,7 +349,7 @@ namespace plib {
};
template <typename T, std::size_t ALIGN>
- /*inline */ C14CONSTEXPR T *assume_aligned_ptr(T *p) noexcept
+ C14CONSTEXPR T *assume_aligned_ptr(T *p) noexcept
{
static_assert(ALIGN >= alignof(T), "Alignment must be greater or equal to alignof(T)");
static_assert(is_pow2(ALIGN), "Alignment must be a power of 2");
@@ -473,4 +473,4 @@ namespace plib {
} // namespace plib
-#endif /* PALLOC_H_ */
+#endif // PALLOC_H_