C++: Fix formatting

This commit is contained in:
Dave Bartolomeo
2020-04-18 09:56:38 -04:00
parent de5abdb29a
commit 8041b74f1c

View File

@@ -453,12 +453,19 @@ CppPRValueType getCanonicalUnsignedIntegerType(int byteSize) {
*/
private int getPrecisionPriority(RealNumberType type) {
// Prefer `double`, `float`, `long double` in that order.
if type instanceof DoubleType then result = 4
else if type instanceof FloatType then result = 3
else if type instanceof LongDoubleType then result = 2
// If we get this far, prefer non-extended-precision types.
else if not type.isExtendedPrecision() then result = 1
else result = 0
if type instanceof DoubleType
then result = 4
else
if type instanceof FloatType
then result = 3
else
if type instanceof LongDoubleType
then result = 2
else
// If we get this far, prefer non-extended-precision types.
if not type.isExtendedPrecision()
then result = 1
else result = 0
}
/**