gree / lwf

LWF - Lightweight SWF
http://gree.github.com/lwf/
zlib License
627 stars 167 forks source link

Using "RELEASE" conflicts with debug/release preprocessor macros #121

Closed nrichards closed 9 years ago

nrichards commented 9 years ago

Hi,

In e.g. lwf_eventbutton.h the uppercase RELEASE enum symbol name is declared. This conflicts with common preprocessor configurations e.g. DEBUG=1 and RELEASE=1 resulting in build errors.

1: Is there a common workaround for this?

2: If not, please consider renaming RELEASE to perhaps UNPRESS (barf, sorry could not come up with better).

splhack commented 9 years ago

I wouldn't like to change the symbol because it breaks code compatibility, I'm not sure RELEASE is common preprocessor define. I recommend you to change LWF source code in your project. just a few lines.

core/lwf_button.cpp
151:        m_handler.Call(EventType::RELEASE, this);
153:    PlayAnimation(Condition::RELEASE);

core/lwf_eventbutton.cpp
52:         EType::RELEASE,

core/lwf_eventbutton.h
46:     RELEASE,

core/lwf_format.h
370:        RELEASE        = (1 << 3),
nrichards commented 9 years ago

Okay, thank you for the consideration and work around idea.

Nick On May 4, 2015 1:52 PM, "Kazuki Sakamoto" notifications@github.com wrote:

Closed #121 https://github.com/gree/lwf/issues/121.

— Reply to this email directly or view it on GitHub https://github.com/gree/lwf/issues/121#event-296638351.