Core/Bitset: Mark swap as noexcept

This commit is contained in:
Jérôme Leclercq 2017-10-20 16:36:43 +02:00
parent 07f20e1893
commit a982215ab7
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ namespace Nz
void ShiftLeft(std::size_t pos);
void ShiftRight(std::size_t pos);
void Swap(Bitset& bitset);
void Swap(Bitset& bitset) noexcept;
bool Test(std::size_t bit) const;
bool TestAll() const;
@ -199,7 +199,7 @@ namespace Nz
namespace std
{
template<typename Block, class Allocator>
void swap(Nz::Bitset<Block, Allocator>& lhs, Nz::Bitset<Block, Allocator>& rhs);
void swap(Nz::Bitset<Block, Allocator>& lhs, Nz::Bitset<Block, Allocator>& rhs) noexcept;
}
#include <Nazara/Core/Bitset.inl>

View File

@ -776,7 +776,7 @@ namespace Nz
* \param bitset Other bitset to swap
*/
template<typename Block, class Allocator>
void Bitset<Block, Allocator>::Swap(Bitset& bitset)
void Bitset<Block, Allocator>::Swap(Bitset& bitset) noexcept
{
std::swap(m_bitCount, bitset.m_bitCount);
std::swap(m_blocks, bitset.m_blocks);
@ -1645,7 +1645,7 @@ namespace std
*/
template<typename Block, class Allocator>
void swap(Nz::Bitset<Block, Allocator>& lhs, Nz::Bitset<Block, Allocator>& rhs)
void swap(Nz::Bitset<Block, Allocator>& lhs, Nz::Bitset<Block, Allocator>& rhs) noexcept
{
lhs.Swap(rhs);
}