adjust scope of enum declaration to fix macOS builds

This commit is contained in:
Jan Käberich 2025-05-04 13:17:16 +02:00
parent 199bb7bbd7
commit 8a5d56ee39
2 changed files with 8 additions and 7 deletions

View file

@ -342,7 +342,7 @@ bool CompoundDriver::setVNA(const DeviceDriver::VNASettings &s, std::function<vo
});
}
lastNonIdleSettings.type = lastNonIdleSettings.Types::VNA;
lastNonIdleSettings.type = Types::VNA;
lastNonIdleSettings.vna = s;
isIdle = false;
@ -403,7 +403,7 @@ bool CompoundDriver::setSA(const DeviceDriver::SASettings &s, std::function<void
}
}
lastNonIdleSettings.type = lastNonIdleSettings.Types::SA;
lastNonIdleSettings.type = Types::SA;
lastNonIdleSettings.sa = s;
isIdle = false;
@ -438,7 +438,7 @@ bool CompoundDriver::setSG(const DeviceDriver::SGSettings &s)
success &= devices[i]->setSG(devSettings);
}
lastNonIdleSettings.type = lastNonIdleSettings.Types::SG;
lastNonIdleSettings.type = Types::SG;
lastNonIdleSettings.sg = s;
isIdle = false;
@ -514,13 +514,13 @@ bool CompoundDriver::setExtRef(QString option_in, QString option_out)
}
// restore last non idle state
switch(lastNonIdleSettings.type) {
case lastNonIdleSettings.Types::VNA:
case Types::VNA:
setVNA(lastNonIdleSettings.vna);
break;
case lastNonIdleSettings.Types::SA:
case Types::SA:
setSA(lastNonIdleSettings.sa);
break;
case lastNonIdleSettings.Types::SG:
case Types::SG:
setSG(lastNonIdleSettings.sg);
break;
}

View file

@ -207,11 +207,12 @@ private:
std::vector<LibreVNADriver*> devices;
bool zerospan;
bool isIdle;
enum class Types{VNA, SA, SG};
struct {
VNASettings vna;
SASettings sa;
SGSettings sg;
enum class Types{VNA, SA, SG} type;
Types type;
} lastNonIdleSettings;
unsigned int VNApoints;
unsigned int SApoints;