Skip to content

Commit

Permalink
[snapshot] move const members together
Browse files Browse the repository at this point in the history
  • Loading branch information
sharder996 committed Jun 28, 2023
1 parent d234eb1 commit e65404d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/backends/shared/base_snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ class BaseSnapshot : public Snapshot
private:
std::string name;
std::string comment;
const QDateTime creation_timestamp;
std::shared_ptr<const Snapshot> parent;

// This class is non-copyable and having these const simplifies thread safety
const QDateTime creation_timestamp; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
const int num_cores; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
const MemorySize mem_size; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
const MemorySize disk_space; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
Expand Down

0 comments on commit e65404d

Please sign in to comment.