get rid of few warnings

This commit is contained in:
VaclavT 2022-01-16 15:04:34 +01:00
parent a1eb0eecbb
commit 44b615959c
6 changed files with 8 additions and 9 deletions

View File

@ -8,6 +8,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall")
project(usql)

View File

@ -51,7 +51,6 @@ size_t CsvReader::parseCSVFile(const std::string &filename, std::vector<ColDefNo
}
if (use_threadpool) {
//std::string csv_string(line_str);
dispatch(tp, std::function<void()>
([this, line_str, &cols_def, &table, &row_cnt, &row_cnt_mutex]() {
// std::cout << "thread: " << std::this_thread::get_id() << " rownum " << row_cnt << "\n";

View File

@ -108,10 +108,10 @@ private:
private:
bool m_uniq;
std::string m_index_name;
std::string m_column_name;
std::string m_index_name;
std::string m_column_name;
ColumnType m_data_type;
bool m_uniq;
std::map<IndexValue, std::vector<rowid_t> > m_index;
};

View File

@ -52,7 +52,7 @@ int ColBooleanValue::compare(ColValue &other) const {
return m_bool == other.getBoolValue() ? 0 : m_bool && !other.getBoolValue() ? -1 : 1; // true first
}
Row::Row(const Row &other) : m_columns(other.m_columns.size()), m_visible(other.m_visible) {
Row::Row(const Row &other) : m_visible(other.m_visible), m_columns(other.m_columns.size()) {
for (int i = 0; i < other.m_columns.size(); i++) {
if (other[i].isNull())
continue; // for null NOP

4
row.h
View File

@ -138,7 +138,7 @@ struct ColBooleanValue : ColValue {
class Row {
public:
explicit Row(int cols_count, bool visible) : m_columns(cols_count), m_visible(visible) {};
explicit Row(int cols_count, bool visible) : m_visible(visible), m_columns(cols_count) {};
Row(const Row &other);
Row &operator=(Row other);
@ -184,7 +184,7 @@ public:
void set_visible() { m_visible = true; };
void set_deleted() { m_visible = true; };
private:
private:
bool m_visible;
std::vector<std::variant<ColNullValue, ColIntegerValue, ColDoubleValue, ColStringValue, ColDateValue, ColBooleanValue>> m_columns;
};

View File

@ -118,8 +118,7 @@ std::unique_ptr<ValueNode> USql::max_function(const std::vector<std::unique_ptr<
throw Exception("unsupported data type for max function");
}
std::unique_ptr<ValueNode>
USql::min_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars, const ColDefNode *col_def_node,
std::unique_ptr<ValueNode> USql::min_function(const std::vector<std::unique_ptr<ValueNode>> &evaluatedPars, const ColDefNode *col_def_node,
ColValue *agg_func_value) {
if (col_def_node->type == ColumnType::integer_type || col_def_node->type == ColumnType::date_type) {
if (!evaluatedPars[0]->isNull()) {