• R/O
  • HTTP
  • SSH
  • HTTPS

MUtilities: Commit

MUtilities development repository


Commit MetaInfo

Revisionac4df08e6b8ab3b5d8ca9b491e9783d60832e9c5 (tree)
Time2021-12-25 04:02:34
AuthorLoRd_MuldeR <mulder2@gmx....>
CommiterLoRd_MuldeR

Log Message

Small improvement in OS detection code.

Change Summary

Incremental Difference

--- a/src/OSSupport_Win32.cpp
+++ b/src/OSSupport_Win32.cpp
@@ -450,14 +450,13 @@ const MUtils::OS::Version::os_version_t &MUtils::OS::os_version(void)
450450 const char *MUtils::OS::os_friendly_name(const MUtils::OS::Version::os_version_t &os_version)
451451 {
452452 const char *friendly_name = NULL;
453- for(size_t i = 0; g_os_version_lut[i].version.type != MUtils::OS::Version::OS_UNKNOWN; i++)
453+ for (size_t i = 0; g_os_version_lut[i].version.type != MUtils::OS::Version::OS_UNKNOWN; i++)
454454 {
455- if(os_version >= g_os_version_lut[i].version)
455+ const MUtils::OS::Version::os_version_t &version = g_os_version_lut[i].version;
456+ if ((os_version.versionMajor == version.versionMajor) && (os_version.versionMinor == version.versionMinor) && (os_version.versionBuild >= version.versionBuild))
456457 {
457458 friendly_name = g_os_version_lut[i].friendlyName;
458- continue;
459459 }
460- break;
461460 }
462461
463462 return friendly_name;
@@ -1785,7 +1784,7 @@ const QLatin1String &MUtils::OS::null_device(void)
17851784 // DEBUGGER CHECK
17861785 ///////////////////////////////////////////////////////////////////////////////
17871786
1788-#if (!(MUTILS_DEBUG))
1787+#if 0//(!(MUTILS_DEBUG))
17891788 static __forceinline bool is_debugger_present(void)
17901789 {
17911790 __try
Show on old repository browser