Skip to content

Commit 8041b74

Browse files
author
Dave Bartolomeo
committed
C++: Fix formatting
1 parent de5abdb commit 8041b74

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

cpp/ql/src/semmle/code/cpp/ir/internal/CppType.qll

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,19 @@ CppPRValueType getCanonicalUnsignedIntegerType(int byteSize) {
453453
*/
454454
private int getPrecisionPriority(RealNumberType type) {
455455
// Prefer `double`, `float`, `long double` in that order.
456-
if type instanceof DoubleType then result = 4
457-
else if type instanceof FloatType then result = 3
458-
else if type instanceof LongDoubleType then result = 2
459-
// If we get this far, prefer non-extended-precision types.
460-
else if not type.isExtendedPrecision() then result = 1
461-
else result = 0
456+
if type instanceof DoubleType
457+
then result = 4
458+
else
459+
if type instanceof FloatType
460+
then result = 3
461+
else
462+
if type instanceof LongDoubleType
463+
then result = 2
464+
else
465+
// If we get this far, prefer non-extended-precision types.
466+
if not type.isExtendedPrecision()
467+
then result = 1
468+
else result = 0
462469
}
463470

464471
/**

0 commit comments

Comments
 (0)