summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-21 13:48:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-22 21:42:14 +0200
commit75997f13ee3a71d6c994392264b0190bd7bb6756 (patch)
tree4dc35a2e62e41d4b1f7953367419ff3fb072635f /tools/source
parentb546af03ab9e371c70ce72562bc0a492972a8585 (diff)
no need to create temporaries when appending number to O[U]StringBuffer
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/debug/debug.cxx28
-rw-r--r--tools/source/fsys/urlobj.cxx2
2 files changed, 15 insertions, 15 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index 7d39fdecac58..82406a3624ff 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -201,7 +201,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
if ( caught >>= specialized )
{
sMessage.append(" ArgumentPosition: ");
- sMessage.append(OString::number(specialized.ArgumentPosition));
+ sMessage.append(static_cast<sal_Int32>(specialized.ArgumentPosition));
}
}
{
@@ -225,7 +225,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
if ( caught >>= specialized )
{
sMessage.append(" ErrorCode: ");
- sMessage.append(OString::number(specialized.ErrorCode));
+ sMessage.append(specialized.ErrorCode);
}
}
{
@@ -233,7 +233,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
if ( caught >>= specialized )
{
sMessage.append(" ErrorCode: ");
- sMessage.append(OString::number(specialized.ErrorCode));
+ sMessage.append(specialized.ErrorCode);
sMessage.append(" ErrorMessageArgument: ");
sMessage.append(toOString(specialized.ErrorMessageArgument));
}
@@ -245,9 +245,9 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
sMessage.append(" DestinationTypeClass: ");
sMessage.append(toOString(comphelper::anyToString(css::uno::Any(specialized.DestinationTypeClass))));
sMessage.append(" Reason: ");
- sMessage.append(OString::number(specialized.Reason));
+ sMessage.append(specialized.Reason);
sMessage.append(" ArgumentIndex: ");
- sMessage.append(OString::number(specialized.ArgumentIndex));
+ sMessage.append(specialized.ArgumentIndex);
}
}
{
@@ -259,7 +259,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
sMessage.append(" language: ");
sMessage.append(toOString(specialized.language));
sMessage.append(" lineNum: ");
- sMessage.append(OString::number(specialized.lineNum));
+ sMessage.append(specialized.lineNum);
}
}
{
@@ -279,7 +279,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
sMessage.append(" language: ");
sMessage.append(toOString(specialized.language));
sMessage.append(" errorType: ");
- sMessage.append(OString::number(specialized.errorType));
+ sMessage.append(specialized.errorType);
}
}
{
@@ -289,7 +289,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
sMessage.append(" SQLState: ");
sMessage.append(toOString(specialized.SQLState));
sMessage.append(" ErrorCode: ");
- sMessage.append(OString::number(specialized.ErrorCode));
+ sMessage.append(specialized.ErrorCode);
sMessage.append("\n wrapped: ");
sMessage.append(exceptionToString(specialized.NextException));
}
@@ -299,7 +299,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
if ( caught >>= specialized )
{
sMessage.append(" PosixError: ");
- sMessage.append(OString::number(specialized.PosixError));
+ sMessage.append(specialized.PosixError);
}
}
{
@@ -307,7 +307,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
if ( caught >>= specialized )
{
sMessage.append(" errcode: ");
- sMessage.append(OString::number( specialized.ErrCode ));
+ sMessage.append( specialized.ErrCode );
}
}
{
@@ -347,7 +347,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
if ( caught >>= specialized )
{
sMessage.append(" CheckPos: ");
- sMessage.append(OString::number( specialized.CheckPos ));
+ sMessage.append( specialized.CheckPos );
}
}
{
@@ -383,9 +383,9 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
sMessage.append(" SystemId: ");
sMessage.append(toOString( specialized.SystemId ));
sMessage.append(" LineNumber: ");
- sMessage.append(OString::number( specialized.LineNumber ));
+ sMessage.append( specialized.LineNumber );
sMessage.append(" ColumnNumber: ");
- sMessage.append(OString::number( specialized.ColumnNumber ));
+ sMessage.append( specialized.ColumnNumber );
}
}
{
@@ -393,7 +393,7 @@ static void exceptionToStringImpl(OStringBuffer& sMessage, const css::uno::Any &
if ( caught >>= specialized )
{
sMessage.append(" Code: ");
- sMessage.append(OString::number( static_cast<sal_Int32>(specialized.Code) ));
+ sMessage.append( static_cast<sal_Int32>(specialized.Code) );
}
}
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index eef92021aa2a..fc5676de7fbc 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2425,7 +2425,7 @@ bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * p
if (*p == '.')
if (nOctets < 4)
{
- aTheCanonic.append( OUString::number(nNumber) );
+ aTheCanonic.append(static_cast<sal_Int64>(nNumber));
aTheCanonic.append( '.' );
++nOctets;
eState = STATE_IP4_DOT;