Skip to content

Commit 395013e

Browse files
committed
misc: remove trailing whitespaces in a bunch of files
Trailing whitespaces are forbidden by any codestyle, so the commit removes them. Also, they can become annoying because some IDEs can automatically remove them turning diff of a patch into a mess.
1 parent 28bae01 commit 395013e

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

src/Client/Connection.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class Connection
177177
template <class T>
178178
rid_t call(const std::string &func, const T &args);
179179
rid_t ping();
180-
180+
181181
/**
182182
* Execute the SQL statement contained in the 'statement' parameter.
183183
* @param statement statement, which should conform to the rules for SQL grammar

src/Client/ResponseReader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ template<class BUFFER>
9999
struct Data {
100100
using it_t = iterator_t<BUFFER>;
101101
std::pair<it_t, it_t> iters;
102-
102+
103103
/** Unpacks tuples to passed container. */
104104
template<class T>
105105
bool decode(T& tuples)

src/Utils/Base64.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ std::pair<INP, OUT> decode(INP first, INP last, OUT dest)
135135
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
136136
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
137137
"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377";
138-
138+
139139
while (true) {
140140
if (BASE64_UNLIKELY(first == last))
141141
return {first, dest};

src/Utils/Mempool.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class MempoolInstance : public MempoolStats<ENABLE_STATS> {
104104
static_assert(sizeof(Slab) == B * M, "Smth went wrong");
105105
static constexpr size_t FIRST_OFFSET = B - sizeof(Slab::next);
106106

107-
using Stats_t = MempoolStats<ENABLE_STATS>;
107+
using Stats_t = MempoolStats<ENABLE_STATS>;
108108

109109
public:
110110
// Constants for stat.
@@ -253,7 +253,7 @@ class MempoolStatic {
253253
public:
254254
static char *allocate() { return instance().allocate(); }
255255
static void deallocate(char *ptr) noexcept { instance().deallocate(ptr); }
256-
int selfcheck() const { return instance().selfcheck(); }
256+
int selfcheck() const { return instance().selfcheck(); }
257257

258258
static constexpr size_t REAL_SIZE = Base_t::REAL_SIZE;
259259
static constexpr size_t BLOCK_SIZE = Base_t::BLOCK_SIZE;

src/mpp/Dec.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ constexpr bool is_any_putable_v =
6060
/**
6161
* If it is true, the object of type T will not be decoded - raw data will
6262
* be saved to it.
63-
*
63+
*
6464
* Now it supports only a pair of iterators (probably, wrapped with
6565
* mpp::as_raw). The check implicilty implies that BUF is an iterator, not
6666
* buffer - it would be strange to pass a pair of buffer to decoder.

test/ClientTest.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ printDatum(const Datum &datum)
114114
*/
115115
template <class BUFFER, class Data = std::vector<UserTuple>>
116116
void
117-
printResponse(Response<BUFFER> &response, Data data = std::vector<UserTuple>())
117+
printResponse(Response<BUFFER> &response, Data data = std::vector<UserTuple>())
118118
{
119119
if (response.body.error_stack != std::nullopt) {
120120
Error err = (*response.body.error_stack)[0];
@@ -699,7 +699,7 @@ class StmtProcessorPrepare {
699699
std::string &stmt)
700700
{
701701
rid_t future = conn.prepare(stmt);
702-
702+
703703
client.wait(conn, future, WAIT_TIMEOUT);
704704
fail_unless(conn.futureIsReady(future));
705705
std::optional<Response<Buf_t>> response = conn.getResponse(future);
@@ -769,7 +769,7 @@ single_conn_sql(Connector<BUFFER, NetProvider> &client)
769769
"COLUMN2 VARCHAR(50), COLUMN3 DOUBLE);";
770770
auto stmt = StmtProcessor::process(client, conn, stmt_str);
771771
rid_t create_table = conn.execute(stmt, std::make_tuple());
772-
772+
773773
client.wait(conn, create_table, WAIT_TIMEOUT);
774774
fail_unless(conn.futureIsReady(create_table));
775775
std::optional<Response<Buf_t>> response = conn.getResponse(create_table);
@@ -784,7 +784,7 @@ single_conn_sql(Connector<BUFFER, NetProvider> &client)
784784
stmt_str = "INSERT INTO TSQL VALUES (20, 'first', 3.2), (21, 'second', 5.4)";
785785
stmt = StmtProcessor::process(client, conn, stmt_str);
786786
rid_t insert = conn.execute(stmt, std::make_tuple());
787-
787+
788788
client.wait(conn, insert, WAIT_TIMEOUT);
789789
fail_unless(conn.futureIsReady(insert));
790790
response = conn.getResponse(insert);
@@ -803,7 +803,7 @@ single_conn_sql(Connector<BUFFER, NetProvider> &client)
803803
stmt_str = "INSERT INTO TSQL VALUES (?, ?, ?), (?, ?, ?), (?, ?, ?);";
804804
stmt = StmtProcessor::process(client, conn, stmt_str);
805805
rid_t insert_args = conn.execute(stmt, args);
806-
806+
807807
client.wait(conn, insert_args, WAIT_TIMEOUT);
808808
fail_unless(conn.futureIsReady(insert_args));
809809
response = conn.getResponse(insert_args);
@@ -818,7 +818,7 @@ single_conn_sql(Connector<BUFFER, NetProvider> &client)
818818
stmt_str = "SELECT * FROM SEQSCAN TSQL;";
819819
stmt = StmtProcessor::process(client, conn, stmt_str);
820820
rid_t select = conn.execute(stmt, std::make_tuple());
821-
821+
822822
client.wait(conn, select, WAIT_TIMEOUT);
823823
fail_unless(conn.futureIsReady(select));
824824
response = conn.getResponse(select);
@@ -841,7 +841,7 @@ single_conn_sql(Connector<BUFFER, NetProvider> &client)
841841
stmt_str = "DROP TABLE IF EXISTS TSQL;";
842842
stmt = StmtProcessor::process(client, conn, stmt_str);
843843
rid_t drop_table = conn.execute(stmt, std::make_tuple());
844-
844+
845845
client.wait(conn, drop_table, WAIT_TIMEOUT);
846846
fail_unless(conn.futureIsReady(drop_table));
847847
response = conn.getResponse(drop_table);
@@ -902,7 +902,7 @@ single_conn_sql(Connector<BUFFER, NetProvider> &client)
902902
stmt_str = "SELECT * FROM SEQSCAN TSQL;";
903903
stmt = StmtProcessor::process(client, conn, stmt_str);
904904
select = conn.execute(stmt, std::make_tuple());
905-
905+
906906
client.wait(conn, select, WAIT_TIMEOUT);
907907
fail_unless(conn.futureIsReady(select));
908908
response = conn.getResponse(select);
@@ -955,7 +955,7 @@ single_conn_sql(Connector<BUFFER, NetProvider> &client)
955955
stmt_str = "UPDATE \"_session_settings\" SET \"value\" = false WHERE \"name\" = 'sql_full_metadata';";
956956
stmt = StmtProcessor::process(client, conn, stmt_str);
957957
rid_t disable_metadata = conn.execute(stmt, std::make_tuple());
958-
958+
959959
client.wait(conn, disable_metadata, WAIT_TIMEOUT);
960960
fail_unless(conn.futureIsReady(disable_metadata));
961961
response = conn.getResponse(disable_metadata);

test/EncDecTest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ test_raw()
11281128

11291129
using it_t = Buf_t::iterator_common<true>;
11301130
it_t run = buf.begin<true>();
1131-
1131+
11321132
std::pair<it_t, it_t> to_wrap;
11331133
auto raw_decoders = std::make_tuple(
11341134
std::pair<it_t, it_t>(),
@@ -1148,7 +1148,7 @@ test_raw()
11481148
fail_if(dec2.first != begin);
11491149
fail_if(dec2.second != end);
11501150
};
1151-
1151+
11521152
auto check_raw_decoders = [&](auto& begin, auto& end) {
11531153
std::apply([&](auto&... decs){(
11541154
...,
@@ -1185,7 +1185,7 @@ test_raw()
11851185
const auto arr_end = run;
11861186
TEST_CASE("decode the first element of array");
11871187
run = svp;
1188-
begin = run;
1188+
begin = run;
11891189
mpp::decode(run, mpp::as_arr(std::forward_as_tuple(num)));
11901190
fail_if(num != arr[0]);
11911191
fail_if(run != arr_end);
@@ -1203,7 +1203,7 @@ test_raw()
12031203
auto elem_begin = begin + 1;
12041204
auto elem_end = elem_begin;
12051205
mpp::decode(elem_end, num);
1206-
check_each_raw_decoder(elem_begin, elem_end);
1206+
check_each_raw_decoder(elem_begin, elem_end);
12071207
TEST_CASE("decode the array key by key");
12081208
run = svp;
12091209
// Array is small - its header occupies one byte.
@@ -1227,7 +1227,7 @@ test_raw()
12271227
const auto map_end = run;
12281228
TEST_CASE("decode one value from map");
12291229
run = svp;
1230-
begin = run;
1230+
begin = run;
12311231
mpp::decode(run, mpp::as_map(std::forward_as_tuple(1, num)));
12321232
fail_if(run != map_end);
12331233
fail_if(num != 2);
@@ -1248,7 +1248,7 @@ test_raw()
12481248
elem_end = elem_begin;
12491249
// Skip value.
12501250
mpp::decode(elem_end, num);
1251-
check_each_raw_decoder(elem_begin, elem_end);
1251+
check_each_raw_decoder(elem_begin, elem_end);
12521252
TEST_CASE("decode the map key by key");
12531253
run = svp;
12541254
// Map is small - its header occupies one byte.
@@ -1292,7 +1292,7 @@ test_variant()
12921292
mpp::encode(buf, wr);
12931293
mpp::decode(run, rd);
12941294
fail_unless(wr == rd);
1295-
1295+
12961296
wr.emplace<2>("string variant");
12971297
mpp::encode(buf, wr);
12981298
mpp::decode(run, rd);

0 commit comments

Comments
 (0)