Mercurial > hg > orthanc-databases
diff Framework/MySQL/MySQLStatement.cpp @ 186:6fe74f9a516e
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Dec 2020 15:05:19 +0100 |
parents | c17f219cec42 |
children | 8a4cc1f715eb |
line wrap: on
line diff
--- a/Framework/MySQL/MySQLStatement.cpp Wed Dec 16 13:59:17 2020 +0100 +++ b/Framework/MySQL/MySQLStatement.cpp Wed Dec 16 15:05:19 2020 +0100 @@ -40,7 +40,7 @@ class MySQLStatement::ResultField : public boost::noncopyable { private: - IValue* CreateIntegerValue(MYSQL_BIND& bind) const + IValue* CreateIntegerValue(const MYSQL_BIND& bind) const { if (length_ != buffer_.size()) { @@ -114,10 +114,10 @@ my_bool isError_; unsigned long length_; - public: - ResultField(const MYSQL_FIELD& field) : - mysqlType_(field.type) + explicit ResultField(const MYSQL_FIELD& field) : + mysqlType_(field.type), + length_(0) { // https://dev.mysql.com/doc/refman/8.0/en/c-api-data-structures.html // https://dev.mysql.com/doc/refman/8.0/en/mysql-stmt-fetch.html => size of "buffer_" @@ -440,7 +440,6 @@ IResult* MySQLStatement::Execute(ITransaction& transaction, const Dictionary& parameters) { - std::list<int> intParameters; std::list<long long int> int64Parameters; std::vector<MYSQL_BIND> inputs(formatter_.GetParametersCount());