Open jonesmz opened 1 year ago
constexpr HierarchicalBitset() = default;
/**
* @brief Construct with size
*
* @param size [in] Size in bits
* @param fill [in] Initialize with 1 bits if true
*/
HierarchicalBitset(std::size_t size, bool fill = false)
: m_size{size}
, m_topLevel{0}
, m_blockCount{ calc_blocks_recurse(size, 0, m_topLevel, m_rows) }
, m_blocks{ std::make_unique<BLOCK_INT_T[]>(m_blockCount) }
{
if (fill)
{
set();
}
}
lgrn::HierarchicalBitset
has a parameterized constructor, but also a default constructor.
In the default constructor, the std::unique_ptr isn't given a buffer, but the rest of the functions of the class assume it has something.
Removing the default constructor and changing the parameterized constructor to
HierarchicalBitset(std::size_t size = 0, bool fill = false)
(Set the size variable to 0 by default)
gets past the crash.
Is the longeron++ submodule up to date? I'm pretty sure I fixed this already and updated the submodule.
https://github.com/Capital-Asterisk/longeronpp/issues/16
I forgot where exactly, but it's not suppose to be calling the default constructor at all, so changing the constructor there would likely cause an error elsewhere
my local source checkout is on commit 1f8b0715fd4e7bb36811acd2636539c9f9e43f88 of longeronpp