On 06/09/2014 07:18 AM, Amos Jeffries wrote:
> ------------------------------------------------------------
> revno: 13458
>   Revert rename of Comm::Flag ERROR

>   On MinGW at least ERROR is a #define'd macro resulting in build failure.
>   Revert to the old name COMM_ERROR until we can find a better one that
>   does not duplicate 'comm'.


The correct solution, IMO, is to avoid all-caps names in C++ enums and
use common prefixes for all names inside an enum. For example:

 typedef enum {
     fgOk = 0,
     fgError = -1,
     fgNoMessage = -3,
     fgTimeout = -4,
...
 } Flag;


or, more verbose:

 typedef enum {
     flagOk = 0,
     flagError = -1,
     flagNoMessage = -3,
     flagTimeout = -4,
...
 } Flag;



HTH,

Alex.

Reply via email to