Skip to content

Commit

Permalink
Refactor: replace tabs with spaces for consistent indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiakiNishimura committed Oct 17, 2024
1 parent fe498c1 commit 5af21f5
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 50 deletions.
4 changes: 2 additions & 2 deletions src/jogasaki/executor/process/impl/ops/context_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ enum class context_state {
[[nodiscard]] constexpr inline std::string_view to_string_view(context_state state) noexcept {
using namespace std::string_view_literals;
switch (state) {
case context_state::active: return "active"sv;
case context_state::abort: return "abort"sv;
case context_state::active: return "active"sv;
case context_state::abort: return "abort"sv;
}
std::abort();
}
Expand Down
8 changes: 4 additions & 4 deletions src/jogasaki/executor/process/impl/ops/operator_base.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2023 Project Tsurugi.
* Copyright 2018-2024 Project Tsurugi.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -229,11 +229,11 @@ class cogroup_operator : public operator_base {
return "record_operator"sv;
}
if (dynamic_cast<group_operator const*>(&op)) {
return "group_operator"sv;
return "group_operator"sv;
}
if (dynamic_cast<cogroup_operator<void> const*>(&op)) {
return "cogroup_operator"sv;
return "cogroup_operator"sv;
}
return "unknown"sv;
}
}
} // namespace jogasaki::executor::process::impl::ops
10 changes: 5 additions & 5 deletions src/jogasaki/executor/process/impl/ops/scan.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2023 Project Tsurugi.
* Copyright 2018-2024 Project Tsurugi.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -207,15 +207,15 @@ operation_status scan::operator()( //NOLINT(readability-function-cognitive-comp
return {operation_status_kind::aborted};
}
}
if (scan_block_size != 0 && scan_block_size == loop_count ){
if (scan_block_size != 0 && scan_block_size == loop_count ){
auto current_time = std::chrono::steady_clock::now();
auto elapsed_time =
std::chrono::duration_cast<std::chrono::milliseconds>(current_time - previous_time);
if (elapsed_time.count() >= scan_yield_interval ) {
return {operation_status_kind::yield};
}
}
loop_count++;
}
loop_count++;
}
finish(context);
if (st != status::not_found) {
Expand Down Expand Up @@ -370,4 +370,4 @@ void scan::dump() const noexcept {
std::cerr << head << std::setw(width) << "field_mapper_:"
<< "not implemented yet" << std::endl;
}
}
} // namespace jogasaki::executor::process::impl::ops
4 changes: 2 additions & 2 deletions src/jogasaki/executor/process/task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ model::task_result task::operator()() {
// TODO support sleep/yield

fail_with_exception();
break;
break;
case abstract::status::to_yield:
VLOG_LP(log_warning) << *this << " process::task to_yield.";
break;
Expand Down Expand Up @@ -108,7 +108,7 @@ bool task::has_transactional_io() {
return has_transactional_io_;
}

}
} // namespace jogasaki::executor::process



4 changes: 2 additions & 2 deletions src/jogasaki/serializer/value_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void write_fixed8(
buffer_view::iterator& position,
buffer_view::const_iterator end) {
BOOST_ASSERT(position < end); // NOLINT
(void) end;
(void) end;
*position = static_cast<byte_type>(value);
++position;
}
Expand All @@ -65,7 +65,7 @@ static void write_bytes(
buffer_view::iterator& position,
buffer_view::const_iterator end) {
BOOST_ASSERT(position + count <= end); // NOLINT
(void) end;
(void) end;
std::memcpy(position, data, count);
position += count;
}
Expand Down
24 changes: 12 additions & 12 deletions src/jogasaki/serializer/value_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_null(iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -75,7 +75,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_int(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -90,7 +90,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_float4(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -105,7 +105,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_float8(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -120,7 +120,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_decimal(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -135,7 +135,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_character(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -150,7 +150,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_octet(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand Down Expand Up @@ -194,7 +194,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_date(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -209,7 +209,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_time_of_day(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand Down Expand Up @@ -240,7 +240,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_time_point(value, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand Down Expand Up @@ -285,7 +285,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_array_begin(size, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand All @@ -300,7 +300,7 @@ class value_writer {
auto *iter = buf.begin();
auto ret = ::jogasaki::serializer::write_row_begin(size, iter, buf.end());
BOOST_ASSERT(ret); // NOLINT
(void) ret;
(void) ret;

auto write_size = static_cast<size_type>(std::distance(buf.begin(), iter));
return writer_->write(buf.data(), write_size);
Expand Down
46 changes: 23 additions & 23 deletions src/tateyama/proto/kvs/response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ message Void {}

/* For response of error containing a error message. */
message Error {
sint32 code = 1;
string detail = 2;
sint32 code = 1;
string detail = 2;
}

// response message for RPC.
Expand Down Expand Up @@ -68,8 +68,8 @@ message Begin {

// request is successfully completed.
message Success {
// the target transaction handle.
transaction.Handle transaction_handle = 1;
// the target transaction handle.
transaction.Handle transaction_handle = 1;
}

// the response body.
Expand Down Expand Up @@ -116,8 +116,8 @@ message Get {

// request is successfully completed.
message Success {
// the record.
repeated data.Record records = 1;
// the record.
repeated data.Record records = 1;
}

// the response body.
Expand Down Expand Up @@ -175,27 +175,27 @@ message Batch {
reserved 1 to 10;

message Opresult {
oneof opresult {
// result of begin
Begin begin = 21;
// result of commit
Commit commit = 22;
// result of put
Put put = 23;
// result of get
Get get = 24;
// result of remove
Remove remove = 25;
}
oneof opresult {
// result of begin
Begin begin = 21;

// result of commit
Commit commit = 22;

// result of put
Put put = 23;

// result of get
Get get = 24;

// result of remove
Remove remove = 25;
}
}

// request is successfully completed.
message Success {
repeated Opresult results = 1;
repeated Opresult results = 1;
}

// the response body.
Expand Down

0 comments on commit 5af21f5

Please sign in to comment.