Mod: use empty
This commit is contained in:
@@ -392,7 +392,7 @@ private:
|
||||
if(ew.perform()) {
|
||||
std::vector<TopoDS_Wire> rw = ew.getResultNoDups();
|
||||
std::vector<TopoDS_Wire> sortedWires = ew.sortStrip(rw,true);
|
||||
if(sortedWires.size()) {
|
||||
if(!sortedWires.empty()) {
|
||||
outerWire = new TopoShapeWirePy(new TopoShape(*sortedWires.begin()));
|
||||
success = true;
|
||||
}
|
||||
|
||||
@@ -848,7 +848,7 @@ unsigned int DrawUtil::intervalMerge(std::vector<std::pair<double, bool>> &marki
|
||||
unsigned int i = 0;
|
||||
bool last = false;
|
||||
|
||||
if (wraps && marking.size() > 0) {
|
||||
if (wraps && !marking.empty()) {
|
||||
last = marking.back().second;
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ std::vector<std::string> DrawViewDimExtent::getSubNames(void)
|
||||
{
|
||||
std::vector<std::string> edgeNames = Source.getSubValues();
|
||||
if (edgeNames.empty() ||
|
||||
edgeNames[0].size() != 0) {
|
||||
!edgeNames[0].empty()) {
|
||||
return std::vector<std::string>(); //garbage first entry - nop
|
||||
}
|
||||
return edgeNames;
|
||||
@@ -184,7 +184,7 @@ pointPair DrawViewDimExtent::getPointsTwoVerts()
|
||||
}
|
||||
|
||||
std::vector<std::string> cTags = CosmeticTags.getValues();
|
||||
if (cTags.size() < 1) {
|
||||
if (cTags.empty()) {
|
||||
return errorValue;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ bool DrawViewDimExtent::checkReferences2D() const
|
||||
}
|
||||
|
||||
std::vector<std::string> cTags = CosmeticTags.getValues();
|
||||
if (cTags.size() < 1) {
|
||||
if (cTags.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ std::vector<TopoDS_Wire> EdgeWalker::sortStrip(std::vector<TopoDS_Wire> fw, bool
|
||||
}
|
||||
}
|
||||
std::vector<TopoDS_Wire> sortedWires = sortWiresBySize(closedWires,false); //biggest 1st
|
||||
if (!sortedWires.size()) {
|
||||
if (sortedWires.empty()) {
|
||||
Base::Console().Log("INFO - EW::sortStrip - no sorted Wires!\n");
|
||||
return sortedWires; // might happen in the middle of changes?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user