mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +02:00
name change shinkIfNeeded() -> shrinkIfNeeded()
This commit is contained in:
parent
b48c2c2717
commit
971804b98e
1 changed files with 8 additions and 8 deletions
|
@ -92,7 +92,7 @@ public:
|
|||
PropertyFlags operator<<(Enum flag) const;
|
||||
|
||||
// NOTE: due to the nature of the compact storage of these property flags, and the fact that the upper bound of the
|
||||
// enum is not know, these operators will only perform their bitwise operations on the set of properties that have
|
||||
// enum is not known, these operators will only perform their bitwise operations on the set of properties that have
|
||||
// been previously set
|
||||
PropertyFlags& operator^=(const PropertyFlags& other);
|
||||
PropertyFlags& operator^=(Enum flag);
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
|
||||
|
||||
private:
|
||||
void shinkIfNeeded();
|
||||
void shrinkIfNeeded();
|
||||
|
||||
QBitArray _flags;
|
||||
int _maxFlag;
|
||||
|
@ -142,7 +142,7 @@ template<typename Enum> inline void PropertyFlags<Enum>::setHasProperty(Enum fla
|
|||
_flags.setBit(flag, value);
|
||||
|
||||
if (flag == _maxFlag && !value) {
|
||||
shinkIfNeeded();
|
||||
shrinkIfNeeded();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,27 +274,27 @@ template<typename Enum> inline PropertyFlags<Enum>& PropertyFlags<Enum>::operato
|
|||
|
||||
template<typename Enum> inline PropertyFlags<Enum>& PropertyFlags<Enum>::operator&=(const PropertyFlags& other) {
|
||||
_flags &= other._flags;
|
||||
shinkIfNeeded();
|
||||
shrinkIfNeeded();
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename Enum> inline PropertyFlags<Enum>& PropertyFlags<Enum>::operator&=(Enum flag) {
|
||||
PropertyFlags other(flag);
|
||||
_flags &= other._flags;
|
||||
shinkIfNeeded();
|
||||
shrinkIfNeeded();
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename Enum> inline PropertyFlags<Enum>& PropertyFlags<Enum>::operator^=(const PropertyFlags& other) {
|
||||
_flags ^= other._flags;
|
||||
shinkIfNeeded();
|
||||
shrinkIfNeeded();
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename Enum> inline PropertyFlags<Enum>& PropertyFlags<Enum>::operator^=(Enum flag) {
|
||||
PropertyFlags other(flag);
|
||||
_flags ^= other._flags;
|
||||
shinkIfNeeded();
|
||||
shrinkIfNeeded();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ template<typename Enum> inline PropertyFlags<Enum> PropertyFlags<Enum>::operator
|
|||
return result;
|
||||
}
|
||||
|
||||
template<typename Enum> inline void PropertyFlags<Enum>::shinkIfNeeded() {
|
||||
template<typename Enum> inline void PropertyFlags<Enum>::shrinkIfNeeded() {
|
||||
int maxFlagWas = _maxFlag;
|
||||
while (_maxFlag >= 0) {
|
||||
if (_flags.testBit(_maxFlag)) {
|
||||
|
|
Loading…
Reference in a new issue