Kaydet (Commit) de0ea666 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Improved loplugin:redundantcast, static_cast on arithmetic types: sal

Change-Id: I7caadbc06b2266800666151de75d799c42148aca
üst 12162c82
...@@ -294,7 +294,7 @@ inline bool approxEqual(double a, double b, sal_Int16 nPrec) ...@@ -294,7 +294,7 @@ inline bool approxEqual(double a, double b, sal_Int16 nPrec)
return true; return true;
double x = a - b; double x = a - b;
return (x < 0.0 ? -x : x) return (x < 0.0 ? -x : x)
< ((a < 0.0 ? -a : a) * (1.0 / (pow(static_cast<double>(2.0), nPrec)))); < ((a < 0.0 ? -a : a) * (1.0 / (pow(2.0, nPrec))));
} }
/** Add two values. /** Add two values.
......
...@@ -1012,7 +1012,7 @@ namespace ...@@ -1012,7 +1012,7 @@ namespace
{ {
const sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding(nIn); const sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding(nIn);
rtl_TextEncoding eTextEnc = rtl_getTextEncodingFromWindowsCharset(nCharSet); rtl_TextEncoding eTextEnc = rtl_getTextEncodingFromWindowsCharset(nCharSet);
CPPUNIT_ASSERT_EQUAL_MESSAGE("rtl_getBestWindowsCharsetFromTextEncoding && rtl_getTextEncodingFromWindowsCharset differ", static_cast<rtl_TextEncoding>(nOut), eTextEnc ); CPPUNIT_ASSERT_EQUAL_MESSAGE("rtl_getBestWindowsCharsetFromTextEncoding && rtl_getTextEncodingFromWindowsCharset differ", nOut, eTextEnc );
} }
void WindowsCharsetFromTextEncoding_MS_1252() void WindowsCharsetFromTextEncoding_MS_1252()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment