billvaglienti / ProtoGen

Communications protocol generation software
MIT License
30 stars 16 forks source link

Compatibility fix for legacy compilers #54

Closed jefffisher closed 7 years ago

jefffisher commented 7 years ago

Older compilers don't support the C++ override keyword. This commit replaces the override keyword in enumcreator.h with Q_DECL_OVERRIDE. From the Qt documentation:

This macro can be used to declare an overriding virtual function. Use of this markup
will allow the compiler to generate an error if the overriding virtual function does not
in fact override anything.

It expands to "override" if your compiler supports that C++11 contextual keyword, or
to nothing otherwise.