mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
cleanup: child class doesn't need to be public
This commit is contained in:
@@ -44,14 +44,6 @@ CardListColumnSelectDialog::CardListColumnSelectDialog(Window* parent, const Gam
|
||||
UpdateWindowUI(wxUPDATE_UI_RECURSE);
|
||||
}
|
||||
|
||||
struct SortByPosition {
|
||||
SortByPosition(const Game& game) : game(game) {}
|
||||
const Game& game;
|
||||
bool operator() (const CardListColumnSelectDialog::ColumnSettingsF& a, const CardListColumnSelectDialog::ColumnSettingsF& b){
|
||||
return a.settings.position < b.settings.position;
|
||||
}
|
||||
};
|
||||
|
||||
void CardListColumnSelectDialog::initColumns() {
|
||||
// order is a list of all columns that may be shown
|
||||
FOR_EACH(f, game->card_fields) {
|
||||
@@ -60,7 +52,9 @@ void CardListColumnSelectDialog::initColumns() {
|
||||
}
|
||||
}
|
||||
// sorted by position
|
||||
sort(columns.begin(), columns.end(), SortByPosition(*game));
|
||||
sort(columns.begin(), columns.end(), [](const ColumnSettingsF& a, const ColumnSettingsF& b) {
|
||||
return a.settings.position < b.settings.position;
|
||||
});
|
||||
// force unique position
|
||||
int min = 0;
|
||||
FOR_EACH(c, columns) {
|
||||
|
||||
@@ -35,7 +35,7 @@ private:
|
||||
wxCheckListBox* list;
|
||||
// other info
|
||||
GameP game; ///< The game we are changing
|
||||
public: struct ColumnSettingsF {
|
||||
struct ColumnSettingsF {
|
||||
ColumnSettingsF(const FieldP& field, const ColumnSettings& settings)
|
||||
: field(field)
|
||||
, settings(settings)
|
||||
@@ -43,7 +43,7 @@ private:
|
||||
FieldP field;
|
||||
ColumnSettings settings;
|
||||
};
|
||||
private: vector<ColumnSettingsF> columns; ///< Settings of the fields, in order
|
||||
vector<ColumnSettingsF> columns; ///< Settings of the fields, in order
|
||||
|
||||
// initialize columns
|
||||
void initColumns();
|
||||
|
||||
Reference in New Issue
Block a user