diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-21 09:20:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-21 11:24:10 +0200 |
commit | 80a900838e46056a9b8886791a490cda0b6254e6 (patch) | |
tree | f11f5d60f5188708deebfea7837a7d1e688ea3a8 /connectivity | |
parent | 1dce9ee7e12871ee63434499db805e806b9e9d3c (diff) |
elide some makeStringAndClear() calls
Change-Id: Ifd8de0042b843de0766a370fb19b9f7791974612
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137284
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/dbase/DTable.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/firebird/PreparedStatement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_tools.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index e68eda511346..df8269383953 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -2683,7 +2683,7 @@ bool ODbaseTable::ReadMemo(std::size_t nBlockNo, ORowSetValue& aVariable) } while (!bReady && !m_pMemoStream->eof()); - aVariable = OStringToOUString(aBStr.makeStringAndClear(), + aVariable = OStringToOUString(aBStr, m_eEncoding); } break; @@ -2717,7 +2717,7 @@ bool ODbaseTable::ReadMemo(std::size_t nBlockNo, ORowSetValue& aVariable) //pad it out with ' ' to expected length on short read sal_Int32 nRequested = sal::static_int_cast<sal_Int32>(nLength); comphelper::string::padToLength(aBuffer, nRequested, ' '); - aVariable = OStringToOUString(aBuffer.makeStringAndClear(), m_eEncoding); + aVariable = OStringToOUString(aBuffer, m_eEncoding); } // if ( bIsText ) else { diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index 816c38d5c7e3..fe30054ebda3 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -382,7 +382,7 @@ sal_Int64 toNumericWithoutDecimalPlace(const OUString& sSource) sBuffer.append(sNumber.subView(0, nDotIndex)); } sBuffer.append(sNumber.subView(nDotIndex + 1)); - return sBuffer.makeStringAndClear().toInt64(); + return o3tl::toInt64(sBuffer); } } diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index eb90c24ce424..94f032f8c128 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -125,7 +125,7 @@ void bufferEscapeConstant( OUStringBuffer & buf, std::u16string_view value, Conn strbuf.setLength( len ); // Previously here RTL_TEXTENCODING_ASCII_US; as we set the PostgreSQL client_encoding to UTF8, // we get UTF8 here, too. I'm not sure why it worked well before... - buf.append( OStringToOUString( strbuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ) ); + buf.append( OStringToOUString( strbuf, RTL_TEXTENCODING_UTF8 ) ); } static void ibufferQuoteConstant( OUStringBuffer & buf, std::u16string_view value, ConnectionSettings *settings ) @@ -890,7 +890,7 @@ css::uno::Sequence< sal_Int32 > string2intarray( const OUString & str ) digits.append(OUString(&c, 1)); c = str.iterateCodePoints(&start); } while ( c ); - vec.push_back( digits.makeStringAndClear().toInt32() ); + vec.push_back( o3tl::toInt32(digits) ); do { if(!iswspace(c)) |