From 8a5d56ee390f3f5ae12f5c08e17738b5064c45ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Sun, 4 May 2025 13:17:16 +0200 Subject: [PATCH] adjust scope of enum declaration to fix macOS builds --- .../Device/LibreVNA/Compound/compounddriver.cpp | 12 ++++++------ .../Device/LibreVNA/Compound/compounddriver.h | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp index bd5239e..6185974 100644 --- a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp +++ b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.cpp @@ -342,7 +342,7 @@ bool CompoundDriver::setVNA(const DeviceDriver::VNASettings &s, std::functionsetSG(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; } diff --git a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h index 2520d0f..09d4faf 100644 --- a/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h +++ b/Software/PC_Application/LibreVNA-GUI/Device/LibreVNA/Compound/compounddriver.h @@ -207,11 +207,12 @@ private: std::vector 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;