remove some unnecessary Boolean checks

- checks for true/false and nullptr
This commit is contained in:
Uwe
2022-12-12 03:12:43 +01:00
committed by Chris Hennes
parent 0e062212b5
commit 0533550f95
6 changed files with 11 additions and 13 deletions

View File

@@ -184,10 +184,10 @@ public:
noUnit = false;
}
if (noUnit == true &&
(num == plus || // 1+ -> 1mm+
num == minus || // 1- -> 1mm-
(pos == length - 1 && (pos += 1)))) { // 1EOL-> 1mmEOL
if (noUnit
&& (num == plus || // 1+ -> 1mm+
num == minus || // 1- -> 1mm-
(pos == length - 1 && (pos += 1)))) {// 1EOL-> 1mmEOL
copy.insert(pos, unitStr);
pos += shift = unitStr.length();
length += shift;