From c8b41aa5d256d99eee67ec94492a94dc30e0ea35 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 24 Jul 2012 14:54:29 +0200 Subject: Remove superfluous std::string()s --- src/modules/extra/m_mysql.cpp | 2 +- src/modules/extra/m_regex_pcre.cpp | 2 +- src/modules/extra/m_regex_posix.cpp | 2 +- src/modules/extra/m_regex_tre.cpp | 2 +- src/modules/extra/m_ssl_gnutls.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 570e7d9ec..4173d654a 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -291,7 +291,7 @@ class SQLConnection : public SQLProvider { /* XXX: See /usr/include/mysql/mysqld_error.h for a list of * possible error numbers and error messages */ - SQLerror e(SQL_QREPLY_FAIL, ConvToStr(mysql_errno(connection)) + std::string(": ") + mysql_error(connection)); + SQLerror e(SQL_QREPLY_FAIL, ConvToStr(mysql_errno(connection)) + ": " + mysql_error(connection)); return new MySQLresult(e); } } diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp index ca6bdfb95..ebd2213b2 100644 --- a/src/modules/extra/m_regex_pcre.cpp +++ b/src/modules/extra/m_regex_pcre.cpp @@ -35,7 +35,7 @@ class PCREException : public ModuleException { public: PCREException(const std::string& rx, const std::string& error, int erroffset) - : ModuleException(std::string("Error in regex ") + rx + " at offset " + ConvToStr(erroffset) + ": " + error) + : ModuleException("Error in regex " + rx + " at offset " + ConvToStr(erroffset) + ": " + error) { } }; diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp index 4cb1a03d5..6e837bcb6 100644 --- a/src/modules/extra/m_regex_posix.cpp +++ b/src/modules/extra/m_regex_posix.cpp @@ -30,7 +30,7 @@ class POSIXRegexException : public ModuleException { public: POSIXRegexException(const std::string& rx, const std::string& error) - : ModuleException(std::string("Error in regex ") + rx + ": " + error) + : ModuleException("Error in regex " + rx + ": " + error) { } }; diff --git a/src/modules/extra/m_regex_tre.cpp b/src/modules/extra/m_regex_tre.cpp index 9693d1258..4b9eab472 100644 --- a/src/modules/extra/m_regex_tre.cpp +++ b/src/modules/extra/m_regex_tre.cpp @@ -32,7 +32,7 @@ class TRERegexException : public ModuleException { public: TRERegexException(const std::string& rx, const std::string& error) - : ModuleException(std::string("Error in regex ") + rx + ": " + error) + : ModuleException("Error in regex " + rx + ": " + error) { } }; diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 06daf763e..6616295b9 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -627,7 +627,7 @@ class ModuleSSLGnuTLS : public Module } else { - user->SetError(std::string("Handshake Failed - ") + gnutls_strerror(ret)); + user->SetError("Handshake Failed - " + std::string(gnutls_strerror(ret))); CloseSession(session); session->status = ISSL_CLOSING; } -- cgit v1.2.3