summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-17 09:20:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-17 13:23:19 +0200
commit1e202ec8aa177d427c5173c5290e09aec1e5c720 (patch)
tree46e06b6f4ee90f294ee95a35c29bbe37c8d89941
parent087995401447a4d452e3daf147c02fb66c7b05c1 (diff)
avoid some copying
Change-Id: I2e8da57f0fe048c3cf7288bf688f9411e62a1ffc Reviewed-on: https://gerrit.libreoffice.org/79035 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--i18nutil/source/utility/unicode.cxx2
-rw-r--r--vcl/source/control/field2.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 7e0c425368be..e8a6aadb16b9 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -965,7 +965,7 @@ OUString ToggleUnicodeCodepoint::StringToReplace()
if( nUPlus != -1 )
{
maInput.remove(0, nUPlus);
- sIn = maInput.copy(2).toString();
+ sIn = maInput.copy(2).makeStringAndClear();
nUPlus = sIn.indexOf("U+");
}
else
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 373be2a0cd34..6d00e2898f04 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2029,7 +2029,7 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie
}
else
{
- nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).toString().toInt32());
+ nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32());
aStr.remove( 0, nSepPos+1 );
nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() );
@@ -2038,7 +2038,7 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie
if ( nSepPos >= 0 )
{
nMinute = nSecond;
- nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).toString().toInt32());
+ nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32());
aStr.remove( 0, nSepPos+1 );
nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() );
@@ -2048,7 +2048,7 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie
{
nHour = nMinute;
nMinute = nSecond;
- nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).toString().toInt32());
+ nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32());
aStr.remove( 0, nSepPos+1 );
}
else