Skip to content

Commit 3042918

Browse files
Merge pull request #14213 from cscd98/readvalue
mingw: move ReadValue definitions into cpp to fix visibility
2 parents 9ec1d70 + e4f6d9b commit 3042918

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Source/Core/Common/WindowsRegistry.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ bool ReadValue(std::string* value, const std::string& subkey, const std::string&
4646
return true;
4747
}
4848

49+
// These explicit instantiations are needed to prevent linker errors when calling
50+
// ReadValue in WinUpdater/Platform.cpp (for u32) and ArmCPUDetect.cpp (for u64)
51+
template bool ReadValue(u32* value, const std::string& subkey, const std::string& name);
52+
template bool ReadValue(u64* value, const std::string& subkey, const std::string& name);
53+
4954
OSVERSIONINFOW GetOSVersion()
5055
{
5156
// PEB may have faked data if the binary is launched with "compatibility mode" enabled.

Source/Core/Common/WindowsRegistry.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ namespace WindowsRegistry
99
{
1010
template <typename T>
1111
bool ReadValue(T* value, const std::string& subkey, const std::string& name);
12-
template bool ReadValue(u32* value, const std::string& subkey, const std::string& name);
13-
template bool ReadValue(u64* value, const std::string& subkey, const std::string& name);
1412
template <>
1513
bool ReadValue(std::string* value, const std::string& subkey, const std::string& name);
1614

0 commit comments

Comments
 (0)