Preprocessor defined in window.h
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Brewtarget |
Fix Committed
|
Medium
|
Mik Firestone |
Bug Description
Environment: Windows 7 x86_64, vs2010, vs2012.
Steps to reproduce.
1 - Compile project.
Results
Compiler generate errors for unit.h:89
Compiler errors:
2>e:\
2>e:\
unit.h:
enum unitScale
{
noScale = -1,
extrasmall = 0,
small = 1, // <- Here
medium = 2,
large = 3,
extralarge = 4,
huge = 5,
without=1000
};
Issues
After being confused to no end and embarking on a journey of debugging, helped by Stack Overflow http://
windows.h in one of its import defines #define small char, and therefore this enum fails for syntax reason.
Possible Fix
I propose slightly altering the name of the variable if you want to build on windows or add #undef small in every file possibly using it.
That value is used all through the UnitSystems and possibly into Units. Renaming isn't trivial. but that's the best option. Let me give this some thought.