Merge pull request #14213 from cscd98/readvalue

mingw: move ReadValue definitions into cpp to fix visibility
This commit is contained in:
Dentomologist
2026-01-17 11:37:27 -08:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+5
View File
@@ -46,6 +46,11 @@ bool ReadValue(std::string* value, const std::string& subkey, const std::string&
return true;
}
// These explicit instantiations are needed to prevent linker errors when calling
// ReadValue in WinUpdater/Platform.cpp (for u32) and ArmCPUDetect.cpp (for u64)
template bool ReadValue(u32* value, const std::string& subkey, const std::string& name);
template bool ReadValue(u64* value, const std::string& subkey, const std::string& name);
OSVERSIONINFOW GetOSVersion()
{
// PEB may have faked data if the binary is launched with "compatibility mode" enabled.
-2
View File
@@ -9,8 +9,6 @@ namespace WindowsRegistry
{
template <typename T>
bool ReadValue(T* value, const std::string& subkey, const std::string& name);
template bool ReadValue(u32* value, const std::string& subkey, const std::string& name);
template bool ReadValue(u64* value, const std::string& subkey, const std::string& name);
template <>
bool ReadValue(std::string* value, const std::string& subkey, const std::string& name);