Fix util::dynamic_bitset operations
This commit is contained in:
parent
c35478ac88
commit
79e90fb03c
1 changed files with 5 additions and 5 deletions
|
|
@ -19,13 +19,13 @@ namespace psemek::util
|
||||||
|
|
||||||
if (storage1.size() < storage2.size())
|
if (storage1.size() < storage2.size())
|
||||||
{
|
{
|
||||||
for (; i < b2.size(); ++i)
|
for (; i < storage2.size(); ++i)
|
||||||
if (0 != storage2[i])
|
if (0 != storage2[i])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (; i < b1.size(); ++i)
|
for (; i < storage1.size(); ++i)
|
||||||
if (storage1[i] != 0)
|
if (storage1[i] != 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -47,13 +47,13 @@ namespace psemek::util
|
||||||
|
|
||||||
if (storage1.size() < storage2.size())
|
if (storage1.size() < storage2.size())
|
||||||
{
|
{
|
||||||
for (; i < b2.size(); ++i)
|
for (; i < storage2.size(); ++i)
|
||||||
if (auto res = 0 <=> storage2[i]; res != std::strong_ordering::equal)
|
if (auto res = 0 <=> storage2[i]; res != std::strong_ordering::equal)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (; i < b1.size(); ++i)
|
for (; i < storage1.size(); ++i)
|
||||||
if (auto res = storage1[i] <=> 0; res != std::strong_ordering::equal)
|
if (auto res = storage1[i] <=> 0; res != std::strong_ordering::equal)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
@ -75,7 +75,7 @@ namespace psemek::util
|
||||||
|
|
||||||
if (storage1.size() > storage2.size())
|
if (storage1.size() > storage2.size())
|
||||||
{
|
{
|
||||||
for (; i < b1.size(); ++i)
|
for (; i < storage1.size(); ++i)
|
||||||
if (storage1[i] != 0)
|
if (storage1[i] != 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue