mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 22:45:18 +00:00
[3673] Fixed cppcheck errors in the MySQL and PgSQL backends.
This is about making some functions static or const.
This commit is contained in:
@@ -240,7 +240,8 @@ public:
|
|||||||
/// data associated with one of the "bind" elements, the
|
/// data associated with one of the "bind" elements, the
|
||||||
/// corresponding element in the error array is set to MLM_TRUE.
|
/// corresponding element in the error array is set to MLM_TRUE.
|
||||||
/// @param count Size of each of the arrays.
|
/// @param count Size of each of the arrays.
|
||||||
void setErrorIndicators(MYSQL_BIND* bind, my_bool* error, size_t count) {
|
static void setErrorIndicators(MYSQL_BIND* bind, my_bool* error,
|
||||||
|
size_t count) {
|
||||||
for (size_t i = 0; i < count; ++i) {
|
for (size_t i = 0; i < count; ++i) {
|
||||||
error[i] = MLM_FALSE;
|
error[i] = MLM_FALSE;
|
||||||
bind[i].error = reinterpret_cast<char*>(&error[i]);
|
bind[i].error = reinterpret_cast<char*>(&error[i]);
|
||||||
@@ -260,8 +261,8 @@ public:
|
|||||||
/// the error.
|
/// the error.
|
||||||
/// @param names Array of column names, the same size as the error array.
|
/// @param names Array of column names, the same size as the error array.
|
||||||
/// @param count Size of each of the arrays.
|
/// @param count Size of each of the arrays.
|
||||||
std::string getColumnsInError(my_bool* error, std::string* names,
|
static std::string getColumnsInError(my_bool* error, std::string* names,
|
||||||
size_t count) {
|
size_t count) {
|
||||||
std::string result = "";
|
std::string result = "";
|
||||||
|
|
||||||
// Accumulate list of column names
|
// Accumulate list of column names
|
||||||
|
@@ -508,7 +508,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Returns column label given a column number
|
/// @brief Returns column label given a column number
|
||||||
std::string getColumnLabel(const size_t column) {
|
std::string getColumnLabel(const size_t column) const {
|
||||||
if (column > columnLabels_.size()) {
|
if (column > columnLabels_.size()) {
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
os << "Unknown column:" << column;
|
os << "Unknown column:" << column;
|
||||||
|
Reference in New Issue
Block a user