Skip to content

Commit

Permalink
Replace NTDDI_WIN11_GE with its value
Browse files Browse the repository at this point in the history
Undefined constants are treated as 0 by the preprocessor, which causes the check to trivially return true for previous SDK versions. Replace the constant with its value (from the newest SDK version) instead,
  • Loading branch information
DKLoehr authored Oct 1, 2024
1 parent ee0a995 commit 15ef2e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sysinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ std::vector<CPUInfo::CacheInfo> GetCacheSizesWindows() {
C.type = "Unknown";
switch (cache.Type) {
// Windows SDK version >= 10.0.26100.0
#if NTDDI_VERSION >= NTDDI_WIN11_GE
// 0x0A000010 is the value of NTDDI_WIN11_GE
#if NTDDI_VERSION >= 0x0A000010
case CacheUnknown:
break;
#endif
Expand Down

0 comments on commit 15ef2e6

Please # to comment.