From 43b9df253afd88d64cc164fdf2b64d0018f33844 Mon Sep 17 00:00:00 2001 From: tomcw Date: Wed, 16 Feb 2022 20:14:40 +0000 Subject: [PATCH] Fix build errors from PR #1039 --- source/Disk.cpp | 4 ++-- source/Harddisk.cpp | 4 ++-- source/Registry.cpp | 4 ++-- source/SerialComms.cpp | 4 ++-- source/Tfe/tfe.cpp | 2 +- source/Utilities.cpp | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/Disk.cpp b/source/Disk.cpp index 95739693..5de8023c 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -180,7 +180,7 @@ void Disk2InterfaceCard::LoadLastDiskImage(const int drive) char pathname[MAX_PATH]; - std::string& regSection = RegGetConfigSlotSection(m_slot); + std::string regSection = RegGetConfigSlotSection(m_slot); if (RegLoadString(regSection.c_str(), regKey.c_str(), TRUE, pathname, MAX_PATH, TEXT("")) && (pathname[0] != 0)) { m_saveDiskImage = false; @@ -204,7 +204,7 @@ void Disk2InterfaceCard::SaveLastDiskImage(const int drive) if (!m_saveDiskImage) return; - std::string& regSection = RegGetConfigSlotSection(m_slot); + std::string regSection = RegGetConfigSlotSection(m_slot); RegSaveValue(regSection.c_str(), REGVALUE_CARD_TYPE, TRUE, CT_Disk2); const std::string regKey = (drive == DRIVE_1) diff --git a/source/Harddisk.cpp b/source/Harddisk.cpp index 2b802eed..65503488 100644 --- a/source/Harddisk.cpp +++ b/source/Harddisk.cpp @@ -229,7 +229,7 @@ void HarddiskInterfaceCard::LoadLastDiskImage(const int drive) char pathname[MAX_PATH]; - std::string& regSection = RegGetConfigSlotSection(m_slot); + std::string regSection = RegGetConfigSlotSection(m_slot); if (RegLoadString(regSection.c_str(), regKey.c_str(), TRUE, pathname, MAX_PATH, TEXT("")) && (pathname[0] != 0)) { m_saveDiskImage = false; @@ -253,7 +253,7 @@ void HarddiskInterfaceCard::SaveLastDiskImage(const int drive) if (!m_saveDiskImage) return; - std::string& regSection = RegGetConfigSlotSection(m_slot); + std::string regSection = RegGetConfigSlotSection(m_slot); RegSaveValue(regSection.c_str(), REGVALUE_CARD_TYPE, TRUE, CT_GenericHDD); const std::string regKey = (drive == HARDDISK_1) diff --git a/source/Registry.cpp b/source/Registry.cpp index a4f1ec25..63b46f59 100644 --- a/source/Registry.cpp +++ b/source/Registry.cpp @@ -171,7 +171,7 @@ void RegDeleteConfigSlotSection(UINT slot) if (!g_sConfigFile.empty()) { - std::string& section = RegGetConfigSlotSection(slot); + std::string section = RegGetConfigSlotSection(slot); return _ini::RegDeleteString(section.c_str(), peruser); } @@ -186,7 +186,7 @@ void RegDeleteConfigSlotSection(UINT slot) &keyhandle); if (status == ERROR_SUCCESS) { - std::string& section = RegGetSlotSection(slot); + std::string section = RegGetSlotSection(slot); LSTATUS status2 = RegDeleteKey(keyhandle, section.c_str()); if (status2 != ERROR_SUCCESS && status2 != ERROR_FILE_NOT_FOUND) _ASSERT(0); diff --git a/source/SerialComms.cpp b/source/SerialComms.cpp index 9c23fe37..90867116 100644 --- a/source/SerialComms.cpp +++ b/source/SerialComms.cpp @@ -92,7 +92,7 @@ CSuperSerialCard::CSuperSerialCard(UINT slot) : // char serialPortName[CSuperSerialCard::SIZEOF_SERIALCHOICE_ITEM]; - std::string& regSection = RegGetConfigSlotSection(m_slot); + std::string regSection = RegGetConfigSlotSection(m_slot); RegLoadString(regSection.c_str(), REGVALUE_SERIAL_PORT_NAME, TRUE, serialPortName, sizeof(serialPortName), TEXT("")); SetSerialPortName(serialPortName); @@ -1397,7 +1397,7 @@ void CSuperSerialCard::SetSerialPortName(const char* pSerialPortName) void CSuperSerialCard::SetRegistrySerialPortName(void) { - std::string& regSection = RegGetConfigSlotSection(m_slot); + std::string regSection = RegGetConfigSlotSection(m_slot); RegSaveString(regSection.c_str(), REGVALUE_SERIAL_PORT_NAME, TRUE, GetSerialPortName()); } diff --git a/source/Tfe/tfe.cpp b/source/Tfe/tfe.cpp index c0688284..15c22e22 100644 --- a/source/Tfe/tfe.cpp +++ b/source/Tfe/tfe.cpp @@ -1454,7 +1454,7 @@ int get_tfe_enabled(void) // Called by: tfe_LoadSnapshot() & ApplyNewConfig() void tfe_SetRegistryInterface(UINT slot, const std::string& name) { - std::string& regSection = RegGetConfigSlotSection(slot); + std::string regSection = RegGetConfigSlotSection(slot); RegSaveString(regSection.c_str(), REGVALUE_UTHERNET_INTERFACE, 1, name); } diff --git a/source/Utilities.cpp b/source/Utilities.cpp index 898b9942..4a8f883c 100644 --- a/source/Utilities.cpp +++ b/source/Utilities.cpp @@ -249,7 +249,7 @@ void LoadConfiguration(bool loadImages) for (UINT slot = SLOT0; slot <= SLOT7; slot++) { - std::string& regSection = RegGetConfigSlotSection(slot); + std::string regSection = RegGetConfigSlotSection(slot); if (RegLoadValue(regSection.c_str(), REGVALUE_CARD_TYPE, TRUE, &dwTmp)) { @@ -261,7 +261,7 @@ void LoadConfiguration(bool loadImages) if ((SS_CARDTYPE)dwTmp == CT_Uthernet) // TODO: move this to when UthernetCard object is instantiated { - std::string& regSection = RegGetConfigSlotSection(slot); + std::string regSection = RegGetConfigSlotSection(slot); if (RegLoadString(regSection.c_str(), REGVALUE_UTHERNET_INTERFACE, TRUE, szFilename, MAX_PATH, TEXT(""))) update_tfe_interface(szFilename);