Companion improve switch conversions (#7895)

* Companion refactor rawswitch conversions

* Consistency
This commit is contained in:
Neil Horne
2020-08-28 15:57:24 +02:00
committed by GitHub
parent bed9c529d7
commit bb19720edf
2 changed files with 33 additions and 60 deletions
+1
View File
@@ -89,6 +89,7 @@ class RawSwitch {
bool isAvailable(const ModelData * const model = NULL, const GeneralSettings * const gs = NULL, Board::Type board = Board::BOARD_UNKNOWN) const;
bool isSet() const { return type != SWITCH_TYPE_NONE || index != 0; }
void clear() { type = SWITCH_TYPE_NONE; index = 0; }
QStringList getSwitchList(Boards board) const;
bool operator== ( const RawSwitch& other) const {
return (this->type == other.type) && (this->index == other.index);