Core/Bitset: Replace static members by static constexpr
Former-commit-id: 0c2a2eb8d766f544016068cdc4be859be2b20dd5
This commit is contained in:
parent
b9ec4a4fc4
commit
bbaa328530
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include <Nazara/Prerequesites.hpp>
|
#include <Nazara/Prerequesites.hpp>
|
||||||
#include <Nazara/Core/String.hpp>
|
#include <Nazara/Core/String.hpp>
|
||||||
|
#include <limits>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
|
@ -89,9 +90,9 @@ namespace Nz
|
||||||
Bitset& operator|=(const Bitset& bitset);
|
Bitset& operator|=(const Bitset& bitset);
|
||||||
Bitset& operator^=(const Bitset& bitset);
|
Bitset& operator^=(const Bitset& bitset);
|
||||||
|
|
||||||
static Block fullBitMask;
|
static constexpr Block fullBitMask = std::numeric_limits<Block>::max();
|
||||||
static unsigned int bitsPerBlock;
|
static constexpr unsigned int bitsPerBlock = std::numeric_limits<Block>::digits;
|
||||||
static unsigned int npos;
|
static constexpr unsigned int npos = std::numeric_limits<unsigned int>::max();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int FindFirstFrom(unsigned int blockIndex) const;
|
unsigned int FindFirstFrom(unsigned int blockIndex) const;
|
||||||
|
|
|
||||||
|
|
@ -521,15 +521,6 @@ namespace Nz
|
||||||
return bit / bitsPerBlock;
|
return bit / bitsPerBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Block, class Allocator>
|
|
||||||
Block Bitset<Block, Allocator>::fullBitMask = std::numeric_limits<Block>::max();
|
|
||||||
|
|
||||||
template<typename Block, class Allocator>
|
|
||||||
unsigned int Bitset<Block, Allocator>::bitsPerBlock = std::numeric_limits<Block>::digits;
|
|
||||||
|
|
||||||
template<typename Block, class Allocator>
|
|
||||||
unsigned int Bitset<Block, Allocator>::npos = std::numeric_limits<unsigned int>::max();
|
|
||||||
|
|
||||||
|
|
||||||
template<typename Block, class Allocator>
|
template<typename Block, class Allocator>
|
||||||
typename Bitset<Block, Allocator>::Bit& Bitset<Block, Allocator>::Bit::Flip()
|
typename Bitset<Block, Allocator>::Bit& Bitset<Block, Allocator>::Bit::Flip()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue