From 9c9277a7711a4842527355a1d665fe3f8c82bc82 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Jan 2018 20:21:12 +0100 Subject: More loplugin:cstylecast: jvmfwk auto-rewrite with "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ifb4b7fa5d2a9111a63da241f75b59528e51f765c --- jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'jvmfwk') diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 224874b5c153..fd6680ae07e1 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -377,12 +377,12 @@ void AsynchReader::execute() std::unique_ptr arTmp( new sal_Char[m_nDataSize]); memcpy(arTmp.get(), m_arData.get(), m_nDataSize); //Enlarge m_arData to hold the newly read data - m_arData.reset(new sal_Char[(size_t)(m_nDataSize + nRead)]); + m_arData.reset(new sal_Char[static_cast(m_nDataSize + nRead)]); //Copy back the data that was already in m_arData memcpy(m_arData.get(), arTmp.get(), m_nDataSize); //Add the newly read data to m_arData - memcpy(m_arData.get() + m_nDataSize, aBuffer, (size_t) nRead); - m_nDataSize += (size_t) nRead; + memcpy(m_arData.get() + m_nDataSize, aBuffer, static_cast(nRead)); + m_nDataSize += static_cast(nRead); } } } @@ -564,7 +564,7 @@ bool decodeOutput(const OString& s, OUString* out) if (aToken[i] < '0' || aToken[i] > '9') return false; } - sal_Unicode value = (sal_Unicode)(aToken.toInt32()); + sal_Unicode value = static_cast(aToken.toInt32()); buff.append(value); } } while (nIndex >= 0); -- cgit