mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-18 10:14:36 +08:00
Coding - Apply more flags from Clang-tidy (#977)
- Refactor boolean expressions and improve code readability across multiple files - Simplified boolean expressions by removing unnecessary comparisons to true/false. - Replaced explicit boolean checks with direct variable usage Used flags: readability-static-accessed-through-instance readability-simplify-boolean-expr performance-for-range-copy performance-move-const-arg misc-unused-parameters misc-redundant-expression
This commit is contained in:
@@ -33,9 +33,9 @@ NCollection_BasePointerVector::NCollection_BasePointerVector(
|
||||
|
||||
NCollection_BasePointerVector::NCollection_BasePointerVector(
|
||||
NCollection_BasePointerVector&& theOther) noexcept
|
||||
: mySize(std::move(theOther.mySize)),
|
||||
myCapacity(std::move(theOther.myCapacity)),
|
||||
myArray(std::move(theOther.myArray))
|
||||
: mySize(theOther.mySize),
|
||||
myCapacity(theOther.myCapacity),
|
||||
myArray(theOther.myArray)
|
||||
{
|
||||
theOther.myCapacity = 0;
|
||||
theOther.mySize = 0;
|
||||
@@ -128,9 +128,9 @@ NCollection_BasePointerVector& NCollection_BasePointerVector::operator=(
|
||||
return *this;
|
||||
}
|
||||
clear();
|
||||
mySize = std::move(theOther.mySize);
|
||||
myCapacity = std::move(theOther.myCapacity);
|
||||
myArray = std::move(theOther.myArray);
|
||||
mySize = theOther.mySize;
|
||||
myCapacity = theOther.myCapacity;
|
||||
myArray = theOther.myArray;
|
||||
theOther.myCapacity = 0;
|
||||
theOther.mySize = 0;
|
||||
theOther.myArray = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user