loplugin:unnecessarygetstr (clang-cl)

Change-Id: Ic0ec1614d48382bb5735a67bf9588657b9ebd521
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159106
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2023-11-08 08:41:12 +01:00
parent 3cd08e3b3c
commit e624979ce4
4 changed files with 8 additions and 8 deletions

View file

@ -76,7 +76,7 @@ static bool dumpCallback(const wchar_t* path, const wchar_t* id,
std::string aPath = conv1.to_bytes(std::wstring(path)) + conv1.to_bytes(std::wstring(id)) + ".dmp";
CrashReporter::addKeyValue("Active-SfxObject",CrashReporter::getActiveSfxObjectName(),CrashReporter::AddItem);
CrashReporter::addKeyValue("Last-4-Uno-Commands",CrashReporter::getLoggedUnoCommands(),CrashReporter::AddItem);
CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath.c_str(), RTL_TEXTENCODING_UTF8), CrashReporter::AddItem);
CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath, RTL_TEXTENCODING_UTF8), CrashReporter::AddItem);
CrashReporter::addKeyValue("GDIHandles", OUString::number(::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS)), CrashReporter::Write);
SAL_WARN("desktop", "minidump generated: " << aPath);
return succeeded;

View file

@ -1817,7 +1817,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::Invoke(DISPID dispidMembe
sParams += ",";
std::stringstream aStringStream;
aStringStream << pdispparams->rgvarg[i];
sParams += OUString::createFromAscii(aStringStream.str().c_str());
sParams += OUString::createFromAscii(aStringStream.str());
}
sParams += "]";
#endif

View file

@ -1116,7 +1116,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(Request& rRequest)
if ( SUCCEEDED(hResult) )
{
const OUString& sItem = m_lItems[bValue];
aValue <<= OUString(sItem.getStr());
aValue <<= sItem;
}
}
break;

View file

@ -113,7 +113,7 @@ OUString get_absolute_path(
std::string make_absolute(const std::string& file_name)
{
OUString fp = get_absolute_path(
get_module_path(), OStringToOUString(file_name.c_str()));
get_module_path(), OStringToOUString(file_name));
return std::string(OUStringToOString(fp));
}
@ -157,7 +157,7 @@ public:
{ return OStringToOUString( maBcp47, RTL_TEXTENCODING_ASCII_US); }
std::string make_std_string() const
{ return maBcp47.getStr(); }
{ return std::string(maBcp47); }
private:
OString maBcp47;
@ -184,7 +184,7 @@ std::string make_winrc_unicode_string(const OUString& str)
std::string make_winrc_unicode_string(const std::string& str)
{
return make_winrc_unicode_string(
OUString::createFromAscii(str.c_str()));
OUString::createFromAscii(str));
}
/** A replacement table contains pairs of
@ -272,8 +272,8 @@ void add_group_entries(
OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8);
Substitutor.add_substitution(
GroupName.getStr(), make_winrc_unicode_string(key_value_utf16));
map[ ltype ] = std::string( iso_lang.getStr() );
std::string(GroupName), make_winrc_unicode_string(key_value_utf16));
map[ ltype ] = std::string( iso_lang );
}
else
{