Skip to content

Commit

Permalink
clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Aug 22, 2024
1 parent 6e2aacb commit d683dfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/limestone/datastore_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class sorting_context {
std::unique_lock lk{obj.mtx_clear_storage};
clear_storage = std::move(obj.clear_storage);

Check warning on line 42 in src/limestone/datastore_snapshot.cpp

View workflow job for this annotation

GitHub Actions / Clang-Tidy

cppcoreguidelines-prefer-member-initializer

'clear_storage' should be initialized in a member initializer of the constructor
}
sorting_context(const sorting_context&) = delete;
sorting_context& operator=(const sorting_context&) = delete;
sorting_context() = default;

// point entries
Expand All @@ -50,7 +52,7 @@ class sorting_context {
std::mutex mtx_clear_storage;

Check warning on line 52 in src/limestone/datastore_snapshot.cpp

View workflow job for this annotation

GitHub Actions / Clang-Tidy

misc-non-private-member-variables-in-classes

member variable 'mtx_clear_storage' has public visibility
std::map<storage_id_type, write_version_type> clear_storage;

Check warning on line 53 in src/limestone/datastore_snapshot.cpp

View workflow job for this annotation

GitHub Actions / Clang-Tidy

misc-non-private-member-variables-in-classes

member variable 'clear_storage' has public visibility
void clear_storage_update(const storage_id_type sid, const write_version_type wv) {
std::unique_lock<std::mutex> lk{mtx_clear_storage};
std::unique_lock lk{mtx_clear_storage};
if (auto [it, inserted] = clear_storage.emplace(sid, wv);
!inserted) {
it->second = std::max(it->second, wv);
Expand Down

0 comments on commit d683dfd

Please sign in to comment.