summaryrefslogtreecommitdiff
path: root/sal/qa/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:17:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:17:51 +0100
commit5a3bb76cd384fa3760fe8481ce008791258595ad (patch)
tree8544fecc06b73cb43000143339c06ad880b56db4 /sal/qa/rtl
parentacd1696a066b8fa6fb94a0613939565799413769 (diff)
More loplugin:cstylecast: sal
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I7d89b011464ba5d2dd12e04d5fc9f65cb4daebde
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r--sal/qa/rtl/digest/rtl_digest.cxx2
-rw-r--r--sal/qa/rtl/textenc/rtl_textcvt.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx
index 6b693067785f..e022cd500d65 100644
--- a/sal/qa/rtl/digest/rtl_digest.cxx
+++ b/sal/qa/rtl/digest/rtl_digest.cxx
@@ -76,7 +76,7 @@ OString createHex(const sal_uInt8* pKeyBuffer, sal_uInt32 nKeyLen)
OStringBuffer aBuffer(nKeyLen * 2 + 1);
for (sal_uInt32 i = 0; i < nKeyLen; ++i)
{
- sal_Int32 nValue = (sal_Int32) pKeyBuffer[i];
+ sal_Int32 nValue = static_cast<sal_Int32>(pKeyBuffer[i]);
if (nValue < 16)
aBuffer.append('0');
aBuffer.append(nValue, 16);
diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx
index 77d7c6a82ac3..4bfdc41742e8 100644
--- a/sal/qa/rtl/textenc/rtl_textcvt.cxx
+++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx
@@ -71,7 +71,7 @@ void testSingleByteCharSet(SingleByteCharSet const & rSet) {
| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR),
&nInfo, &nConverted);
CPPUNIT_ASSERT_EQUAL(nNumber, nSize);
- CPPUNIT_ASSERT_EQUAL((sal_uInt32)0, nInfo);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), nInfo);
CPPUNIT_ASSERT_EQUAL(nNumber, nConverted);
rtl_destroyTextToUnicodeContext(aConverter, aContext);
rtl_destroyTextToUnicodeConverter(aConverter);
@@ -116,7 +116,7 @@ void testSingleByteCharSet(SingleByteCharSet const & rSet) {
| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR),
&nInfo, &nConverted);
CPPUNIT_ASSERT_EQUAL(nNumber, nSize);
- CPPUNIT_ASSERT_EQUAL((sal_uInt32)0, nInfo);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), nInfo);
CPPUNIT_ASSERT_EQUAL(nNumber, nConverted);
rtl_destroyUnicodeToTextContext(aConverter, aContext);
rtl_destroyUnicodeToTextConverter(aConverter);
@@ -163,9 +163,9 @@ void testSingleByteCharSet(SingleByteCharSet const & rSet) {
sal_uInt32 nExpectedInfo = (RTL_TEXTTOUNICODE_INFO_ERROR | RTL_TEXTTOUNICODE_INFO_UNDEFINED);
- CPPUNIT_ASSERT_EQUAL((sal_Size) 0, nSize);
+ CPPUNIT_ASSERT_EQUAL(sal_Size(0), nSize);
CPPUNIT_ASSERT_EQUAL(nExpectedInfo, nInfo);
- CPPUNIT_ASSERT_EQUAL((sal_Size) 0, nConverted);
+ CPPUNIT_ASSERT_EQUAL(sal_Size(0), nConverted);
rtl_destroyTextToUnicodeContext(aConverter, aContext);
rtl_destroyTextToUnicodeConverter(aConverter);
@@ -214,7 +214,7 @@ void doComplexCharSetTest(ComplexCharSetTest const & rTest) {
RTL_TEXTTOUNICODE_FLAGS_GLOBAL_SIGNATURE : 0)),
&nInfo, &nConverted);
CPPUNIT_ASSERT_EQUAL(rTest.m_nUnicodeSize, nSize);
- CPPUNIT_ASSERT_EQUAL((sal_uInt32) 0, nInfo);
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), nInfo);
CPPUNIT_ASSERT_EQUAL(rTest.m_nTextSize, nConverted);
rtl_destroyTextToUnicodeContext(aConverter, aContext);
@@ -264,7 +264,7 @@ void doComplexCharSetTest(ComplexCharSetTest const & rTest) {
nFlags, &nInfo, &nConverted);
nOutput += nSize;
nInput += nConverted;
- CPPUNIT_ASSERT_EQUAL((sal_uInt32) 0,
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0),
(nInfo & ~RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOOSMALL));
}
CPPUNIT_ASSERT_EQUAL(rTest.m_nUnicodeSize, nOutput);