Mercurial > hg > orthanc-postgresql
changeset 177:25d524f26a14
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 20 Apr 2018 08:59:01 +0200 (2018-04-20) |
parents | 0831444fd484 |
children | 1b22bbc8468b 2989c6a7adf9 |
files | Core/PostgreSQLConnection.cpp Core/PostgreSQLConnection.h IndexPlugin/PostgreSQLWrapper.cpp |
diffstat | 3 files changed, 8 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/PostgreSQLConnection.cpp Fri Apr 20 08:51:22 2018 +0200 +++ b/Core/PostgreSQLConnection.cpp Fri Apr 20 08:59:01 2018 +0200 @@ -46,26 +46,15 @@ } - PostgreSQLConnection::PostgreSQLConnection() - { - pg_ = NULL; - host_ = "localhost"; - port_ = 5432; - username_ = "postgres"; - password_ = "postgres"; - database_ = ""; - uri_.clear(); - } - - - PostgreSQLConnection::PostgreSQLConnection(const PostgreSQLConnection& other) : - host_(other.host_), - port_(other.port_), - username_(other.username_), - password_(other.password_), - database_(other.database_), + PostgreSQLConnection::PostgreSQLConnection() : + host_("localhost"), + port_(5432), + username_("postgres"), + password_("postgres"), pg_(NULL) { + database_.clear(); + uri_.clear(); }
--- a/Core/PostgreSQLConnection.h Fri Apr 20 08:51:22 2018 +0200 +++ b/Core/PostgreSQLConnection.h Fri Apr 20 08:59:01 2018 +0200 @@ -46,8 +46,6 @@ public: PostgreSQLConnection(); - PostgreSQLConnection(const PostgreSQLConnection& other); - ~PostgreSQLConnection() { Close();
--- a/IndexPlugin/PostgreSQLWrapper.cpp Fri Apr 20 08:51:22 2018 +0200 +++ b/IndexPlugin/PostgreSQLWrapper.cpp Fri Apr 20 08:59:01 2018 +0200 @@ -127,7 +127,7 @@ { char info[1024]; sprintf(info, "This database plugin is incompatible with your version of Orthanc " - "expecting the DB schema version %d, but this plugin is compatible with versions 5 or 6", + "expecting the DB schema version %u, but this plugin is compatible with versions 5 or 6", expectedVersion); OrthancPluginLogError(context_, info); throw PostgreSQLException(info);