From 549f37efb8e0ca7e539f5c9804dcff6572c26199 Mon Sep 17 00:00:00 2001 From: Lynix Date: Tue, 17 May 2016 17:08:45 +0200 Subject: [PATCH] Core/Bitset: Fix OR/XOR with two bitset of similar size Former-commit-id: df5c15cb0c1c4984c7bc142886843f8977379ec2 --- include/Nazara/Core/Bitset.inl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/Nazara/Core/Bitset.inl b/include/Nazara/Core/Bitset.inl index 568d4a815..f7256bdbb 100644 --- a/include/Nazara/Core/Bitset.inl +++ b/include/Nazara/Core/Bitset.inl @@ -329,8 +329,8 @@ namespace Nz template void Bitset::PerformsOR(const Bitset& a, const Bitset& b) { - const Bitset& greater = (a.GetBlockCount() > b.GetBlockCount()) ? a : b; - const Bitset& lesser = (a.GetBlockCount() > b.GetBlockCount()) ? b : a; + const Bitset& greater = (a.GetSize() > b.GetSize()) ? a : b; + const Bitset& lesser = (a.GetSize() > b.GetSize()) ? b : a; unsigned int maxBlockCount = greater.GetBlockCount(); unsigned int minBlockCount = lesser.GetBlockCount(); @@ -358,8 +358,8 @@ namespace Nz template void Bitset::PerformsXOR(const Bitset& a, const Bitset& b) { - const Bitset& greater = (a.GetBlockCount() > b.GetBlockCount()) ? a : b; - const Bitset& lesser = (a.GetBlockCount() > b.GetBlockCount()) ? b : a; + const Bitset& greater = (a.GetSize() > b.GetSize()) ? a : b; + const Bitset& lesser = (a.GetSize() > b.GetSize()) ? b : a; unsigned int maxBlockCount = greater.GetBlockCount(); unsigned int minBlockCount = lesser.GetBlockCount();