Skip to content

Commit

Permalink
Clang tidy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ErakhtinB committed Jan 29, 2025
1 parent 5cdeda4 commit 4d822b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/state_metrics/impl/state_metrics_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace kagome::state_metrics {
return std::nullopt;
}
scale::ScaleDecoderStream decoder(opt_data.value());
uint32_t active_era;
uint32_t active_era = 0;
try {
decoder >> active_era;
} catch (const std::exception &e) {
Expand Down Expand Up @@ -168,8 +168,8 @@ namespace kagome::state_metrics {
const std::vector<uint8_t> &data) try {
scale::ScaleDecoderStream decoder(data);

uint32_t _;
decoder >> _; // total_points
uint32_t total_points = 0;
decoder >> total_points;

std::map<primitives::AccountId, uint32_t> individual_points;
decoder >> individual_points;
Expand Down
2 changes: 1 addition & 1 deletion core/state_metrics/impl/state_metrics_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace kagome::state_metrics {
std::shared_ptr<libp2p::basic::Scheduler> scheduler,
std::shared_ptr<api::StateApi> state_api,
std::shared_ptr<metrics::Registry> registry);
virtual ~StateMetricsImpl();
~StateMetricsImpl() override;

static outcome::result<std::shared_ptr<StateMetricsImpl>> create(
const application::AppConfiguration &app_config,
Expand Down

0 comments on commit 4d822b9

Please sign in to comment.