Added clang-tidy config and cleaned up the code a little.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
namespace mijin
|
||||
@@ -32,8 +31,9 @@ private:
|
||||
using byte_type = std::conditional_t<threadSafe, std::atomic_uint8_t, std::uint8_t>;
|
||||
std::array<byte_type, (numBits + 7) / 8> bytes;
|
||||
public:
|
||||
[[nodiscard]] bool get(std::size_t index) const {
|
||||
assert(index < numBits);
|
||||
[[nodiscard]] bool get(std::size_t index) const
|
||||
{
|
||||
MIJIN_ASSERT(index < numBits, "BitArray: index out of range.");
|
||||
return (bytes[index / 8] & (1 << (index % 8)));
|
||||
}
|
||||
void set(std::size_t index, bool value)
|
||||
|
||||
Reference in New Issue
Block a user