summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-28 10:35:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-28 12:07:54 +0100
commitbc539bd3c04964471af6b5ca54264215c8995696 (patch)
treec37af5b9fb3dc0b8677fc8dd535fb8e93ad6039d /io
parent9f78a4174e5099ad3af65a23e158a51c1afca54d (diff)
loplugin:stringadd improve detection
if one side of the expression is a compile-time-constant, we don't need to worry about side-effects on the other side Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b Reviewed-on: https://gerrit.libreoffice.org/81589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io')
-rw-r--r--io/source/acceptor/acc_socket.cxx8
-rw-r--r--io/source/connector/ctr_socket.cxx8
2 files changed, 8 insertions, 8 deletions
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index ba6938928bbe..a72179ecb356 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -168,8 +168,8 @@ namespace io_acceptor {
if(i != nBytesToRead)
{
- OUString message("acc_socket.cxx:SocketConnection::read: error - ");
- message += m_socket.getErrorAsString();
+ OUString message = "acc_socket.cxx:SocketConnection::read: error - " +
+ m_socket.getErrorAsString();
IOException ioException(message, static_cast<XConnection *>(this));
@@ -202,8 +202,8 @@ namespace io_acceptor {
{
if( m_socket.write( seq.getConstArray() , seq.getLength() ) != seq.getLength() )
{
- OUString message("acc_socket.cxx:SocketConnection::write: error - ");
- message += m_socket.getErrorAsString();
+ OUString message = "acc_socket.cxx:SocketConnection::write: error - " +
+ m_socket.getErrorAsString();
IOException ioException(message, static_cast<XConnection *>(this));
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index ab2eefd87872..6523d6408599 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -129,8 +129,8 @@ namespace stoc_connector {
if(i != nBytesToRead && m_socket.getError() != osl_Socket_E_None)
{
- OUString message("ctr_socket.cxx:SocketConnection::read: error - ");
- message += m_socket.getErrorAsString();
+ OUString message = "ctr_socket.cxx:SocketConnection::read: error - " +
+ m_socket.getErrorAsString();
IOException ioException(message, static_cast<XConnection *>(this));
@@ -163,8 +163,8 @@ namespace stoc_connector {
{
if( m_socket.write( seq.getConstArray() , seq.getLength() ) != seq.getLength() )
{
- OUString message("ctr_socket.cxx:SocketConnection::write: error - ");
- message += m_socket.getErrorAsString();
+ OUString message = "ctr_socket.cxx:SocketConnection::write: error - "+
+ m_socket.getErrorAsString();
IOException ioException(message, static_cast<XConnection *>(this));