Refactoring putsSwitches

Will simplify things when we have 64 logical switches ...
This commit is contained in:
Bertrand Songis
2015-08-31 20:48:32 +02:00
parent 771206e1b2
commit 398d32821e
19 changed files with 126 additions and 169 deletions
+2 -2
View File
@@ -203,7 +203,7 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
if (swtch < 0) {
negative = true;
if (swtch == -SWSRC_ON || swtch == -SWSRC_One) {
if (swtch == -SWSRC_ON || swtch == -SWSRC_ONE) {
return false;
}
swtch = -swtch;
@@ -245,7 +245,7 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
}
}
if (context != ModelCustomFunctionsContext && context != GeneralCustomFunctionsContext && (swtch == SWSRC_ON || swtch == SWSRC_One)) {
if (context != ModelCustomFunctionsContext && context != GeneralCustomFunctionsContext && (swtch == SWSRC_ON || swtch == SWSRC_ONE)) {
return false;
}