Skip to content

Commit 24113a1

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 24113a1

File tree

4 files changed

+70
-73
lines changed

4 files changed

+70
-73
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: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#include <regex>
99
using namespace std::string_literals;
1010

11-
12-
using namespace std::string_literals;
13-
1411
#define BOOST_BIND_ACTION_PARAM( push_name ,param ) boost::bind( &push_name::operator(), g_ ## push_name , _1 ,_2, param)
1512
namespace s3selectEngine
1613
{
@@ -446,13 +443,13 @@ struct _fn_to_int : public base_function
446443
if ((errno == ERANGE && (i == LONG_MAX || i == LONG_MIN)) || (errno != 0 && i == 0)) {
447444
throw base_s3select_exception("converted value would fall out of the range of the result type!");
448445
return false;
449-
}
446+
}
450447

451-
if (*perr != '\0') {
452-
throw base_s3select_exception("characters after int!");
453-
return false;
448+
if (*perr != '\0') {
449+
throw base_s3select_exception("characters after int!");
450+
return false;
451+
}
454452
}
455-
}
456453
else if (func_arg.type == value::value_En_t::FLOAT)
457454
{
458455
i = func_arg.dbl();
@@ -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)