Skip to content

Commit

Permalink
Merge pull request #37 from oblivioncth/dev
Browse files Browse the repository at this point in the history
Merge to master for v0.2.0.2 hotfix
  • Loading branch information
oblivioncth authored Jan 2, 2023
2 parents 3d1a5fa + 76ea559 commit 6a59970
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ option(STARPP_DOCS "Build STAR++ documentation" OFF)
# Project
# NOTE: DON'T USE TRAILING ZEROS IN VERSIONS
project(STARpp
VERSION 0.2.0.1
VERSION 0.2.0.2
LANGUAGES CXX
DESCRIPTION "C++ implementation of STAR voting"
)
Expand Down
2 changes: 1 addition & 1 deletion app/src/resultspresenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void ResultPresenter::printElectionResult(const Star::ElectionResult& result)

// Print raw score rankings
cout << HEADING_SCORE_RANKINGS << endl;
for(const Rank& rank : result.election()->scoreRankings())
for(const Star::Rank& rank : result.election()->scoreRankings())
cout << RAW_SCORE_TEMPLATE.arg(Qx::String::join(rank.candidates, R"(", ")")).arg(rank.value) << endl;
cout << endl;

Expand Down
5 changes: 5 additions & 0 deletions lib/include/star/rank.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// Qt Includes
#include <QSet>

namespace Star
{

struct Rank
{
enum Order { Ascending, Descending };
Expand All @@ -14,4 +17,6 @@ struct Rank
static QList<Rank> rankSort(const QMap<QString, int>& valueMap, Order order = Descending);
};

}

#endif // RANK_H
5 changes: 5 additions & 0 deletions lib/src/rank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// Qt Includes
#include <QMultiMap>

namespace Star
{

//===============================================================================================================
// Rank
//===============================================================================================================
Expand Down Expand Up @@ -105,3 +108,5 @@ QList<Rank> Rank::rankSort(const QMap<QString, int>& valueMap, Order order)

return rankings;
}

}

0 comments on commit 6a59970

Please sign in to comment.