From 5c4461a15479255648f2314a3edb5f453dbaa5a4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 12 Dec 2020 15:18:29 +0100 Subject: [PATCH] Return "" and not "Unknown" from wxMSW wxGetCpuArchitectureName() This is more consistent with the Unix version, and easier to test for in the application code. --- interface/wx/utils.h | 3 +++ src/msw/utils.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/interface/wx/utils.h b/interface/wx/utils.h index b241060a96..1d17b6986e 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -995,6 +995,9 @@ bool wxIsPlatformLittleEndian(); "arm64", or "i86pc". The name for the same CPU running on the same hardware can vary across operating systems. + The returned string may be empty if the CPU architecture couldn't be + recognized. + @since 3.1.5 */ wxString wxGetCpuArchitectureName(); diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 053f7e2c54..6090e1351d 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1297,7 +1297,7 @@ wxString wxGetCpuArchitectureName() case PROCESSOR_ARCHITECTURE_UNKNOWN: default: - return "Unknown"; + return wxString(); } }