Skip to content

Commit 9b6c158

Browse files
committed
s3select:clang-tidying of s3select_oper.h
... and some undoing of formatting changes (and rebasing...) Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
1 parent 62320d6 commit 9b6c158

File tree

4 files changed

+66
-69
lines changed

4 files changed

+66
-69
lines changed

include/s3select.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <boost/bind.hpp>
1616
#include <functional>
1717

18-
using namespace std::string_literals;
1918

2019
#define _DEBUG_TERM {string token(a,b);std::cout << __FUNCTION__ << token << std::endl;}
2120

@@ -932,7 +931,7 @@ void push_negation::builder(s3select* self, const char* a, const char* b) const
932931
//upon NOT operator, the logical and arithmetical operators are "tagged" to negate result.
933932
if (dynamic_cast<logical_operand*>(pred))
934933
{
935-
logical_operand* f = S3SELECT_NEW(self, logical_operand, pred); // todo: marked as "empty statemant"
934+
logical_operand* f = S3SELECT_NEW(self, logical_operand, pred);
936935
self->getAction()->condQ.push_back(f);
937936
}
938937
else if (dynamic_cast<__function*>(pred) || dynamic_cast<negate_function_operation*>(pred))

include/s3select_functions.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include <boost/algorithm/string.hpp>
77
#include <boost/algorithm/string/trim.hpp>
88
#include <regex>
9-
using namespace std::string_literals;
10-
119

1210
using namespace std::string_literals;
1311

@@ -452,7 +450,7 @@ struct _fn_to_int : public base_function
452450
throw base_s3select_exception("characters after int!");
453451
return false;
454452
}
455-
}
453+
}
456454
else if (func_arg.type == value::value_En_t::FLOAT)
457455
{
458456
i = func_arg.dbl();
@@ -476,7 +474,6 @@ struct _fn_to_float : public base_function
476474

477475
bool operator()(bs_stmt_vec_t* args, variable* result) override
478476
{
479-
char* perr;
480477
value v = (*args->begin())->eval();
481478

482479
switch (v.type) {
@@ -497,8 +494,8 @@ struct _fn_to_float : public base_function
497494
}
498495

499496
var_result = d;
500-
break;
501497
}
498+
break;
502499

503500
case value::value_En_t::FLOAT:
504501
var_result = v.dbl();
@@ -595,7 +592,7 @@ struct _fn_to_timestamp : public base_function
595592

596593
bsc::parse_info<> info_dig = bsc::parse(v_str.str(), d_yyyymmdd_dig >> *(separator) >> d_time_dig);
597594

598-
if(!datetime_validation() or !info_dig.full)
595+
if(!datetime_validation() || !info_dig.full)
599596
{
600597
throw base_s3select_exception("input date-time is illegal");
601598
}

0 commit comments

Comments
 (0)