Skip to content

Commit

Permalink
[review] formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sharder996 committed Jun 23, 2023
1 parent cc38527 commit d4809df
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions include/multipass/snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <unordered_map>

class QJsonObject;
class QDateTime;

namespace multipass
{
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ try // clang-format on

auto timestamp = fundamentals->mutable_creation_timestamp();
timestamp->set_seconds(snapshot->get_creation_timestamp().toSecsSinceEpoch());
timestamp->set_nanos(snapshot->get_creation_timestamp().time().msec() * 1000000);
timestamp->set_nanos(snapshot->get_creation_timestamp().time().msec() * 1'000'000);
};

if (const auto& it = instance_snapshots_map.find(name);
Expand Down
6 changes: 3 additions & 3 deletions src/platform/backends/shared/base_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ std::shared_ptr<const mp::Snapshot> find_parent(const QJsonObject& json, const m
}
} // namespace

mp::BaseSnapshot::BaseSnapshot(const std::string& name, const std::string& comment, const QDateTime& creation_timestamp,
std::shared_ptr<const Snapshot> parent, int num_cores, MemorySize mem_size,
MemorySize disk_space, VirtualMachine::State state,
mp::BaseSnapshot::BaseSnapshot(const std::string& name, const std::string& comment, // NOLINT(modernize-pass-by-value)
const QDateTime& creation_timestamp, std::shared_ptr<const Snapshot> parent,
int num_cores, MemorySize mem_size, MemorySize disk_space, VirtualMachine::State state,
std::unordered_map<std::string, VMMount> mounts, QJsonObject metadata)
: name{name},
comment{comment},
Expand Down
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 @@ -40,8 +40,8 @@ class BaseSnapshot : public Snapshot

std::string get_name() const override;
std::string get_comment() const override;
std::string get_parent_name() const override;
QDateTime get_creation_timestamp() const override;
std::string get_parent_name() const override;
std::shared_ptr<const Snapshot> get_parent() const override;

int get_num_cores() const noexcept override;
Expand Down

0 comments on commit d4809df

Please sign in to comment.