Skip to content

Commit

Permalink
Refactor code to address clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
umegane committed Jan 22, 2025
1 parent 7c8f440 commit 61432b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/limestone/log_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class log_entry {
return rc;
}

bool read_entry_from(std::istream& strm, read_error& ec) {
bool read_entry_from(std::istream& strm, read_error& ec) { // NOLINT(readability-function-cognitive-complexity)
ec.value(read_error::ok);
ec.entry_type(entry_type::this_id_is_not_used);
char one_char{};
Expand Down Expand Up @@ -472,8 +472,8 @@ class log_entry {
const std::size_t blob_count = blob_ids_.size() / sizeof(blob_id_type);
blob_ids.reserve(blob_count);
for (std::size_t i = 0; i < blob_count; ++i) {
blob_id_type blob_id;
memcpy(&blob_id, blob_ids_.data() + i * sizeof(blob_id_type), sizeof(blob_id_type));
blob_id_type blob_id = 0;
std::memcpy(&blob_id, &blob_ids_[i * sizeof(blob_id_type)], sizeof(blob_id_type));
blob_ids.push_back(le64toh(blob_id));
}
return blob_ids;
Expand Down

0 comments on commit 61432b8

Please sign in to comment.