Visitar URL original
#14198 (consistently use _WIN32 in preprocessor checks) – Cppcheck

Opened 13 months ago

Closed 11 months ago

Last modified 11 months ago

#14198 closed task (fixed)

consistently use _WIN32 in preprocessor checks

Reported by: kidkat Owned by: kidkat
Priority: safety-cosmetic Milestone: 2.19
Component: Other Version:
Keywords: Cc:

Description

The define _WIN32 is built into the compiler for Windows platforms.

But we also have code which checks for WIN32 which is only set in our Visual Studio project files.

We should consistently only be checking for the built-in one.

Change History (3)

comment:1 by kidkat, 11 months ago

We should also remove the custom definition of WIN32 if we no longer use it.

And we can also remove the definition of _WIN64 as it is a built-in macro: ​https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170#microsoft-specific-predefined-macros.

comment:2 by kidkat, 11 months ago

Milestone: → 2.19
Resolution: → fixed
Status: assigned → closed

comment:3 by Daniel Marjamäki, 11 months ago

Priority: Normal → safety-cosmetic
Note: See TracTickets for help on using tickets.