Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Oct 5, 2023
1 parent 00fb8ec commit 8fddfc4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cpp/scsictl/scsictl_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,8 @@ string ScsictlDisplay::DisplayStatisticsInfo(const PbStatisticsInfo& statistics_

s << "Statistics:\n";

vector<PbStatistics> sorted_statistics;
for (const auto& statistics : statistics_info.statistics()) {
sorted_statistics.push_back(statistics);
}

// Sort by descending category and ascending key
vector<PbStatistics> sorted_statistics = { statistics_info.statistics().begin(), statistics_info.statistics().end() };
ranges::sort(sorted_statistics, [] (const PbStatistics& a, const PbStatistics& b)
{ return a.category() > b.category() || a.key() < b.key(); } );

Expand Down

0 comments on commit 8fddfc4

Please sign in to comment.