← Back to team overview

kicad-developers team mailing list archive

Re: Feature freeze.

 

On 6/15/2015 12:29 PM, jp charras wrote:
> Le 15/06/2015 16:27, Maciej Sumiński a écrit :
>> On 03/30/2015 12:00 AM, Tomasz Wlostowski wrote:
>>> Hi Wayne,
>>>
>>> Some time ago I modified a bit the REPORTER class: added message 
>>> severity levels & a wxHtmlView widget to filter/display them
>>> (see attached drawing showing the new report panel integrated
>>> with the netlist dialog). Do you agree to merge it?
>>>
>>> Cheers, Tom
>>
>> I enclose Tom's patch rebased on the current revision. I can merge
>> it, if there are no further objections.
>>
>> Regards, Orson
> 
> I tested the patch (after a fix), and it looks very good.
> 
> However, on Windows, there is a conflict with something, in reporter.h.
> the code:
> public:
>     ///> Severity of the reported messages. Prov
>     enum SEVERITY {
>         UNDEFINED = 0x0,
>         INFO = 0x1,
>         WARNING = 0x2,
>         ERROR = 0x4,
>         ACTION = 0x8
>     };
> conflicts, in line  ERROR = 0x4,
> 
> I just modified it to:
> public:
>     ///> Severity of the reported messages. Prov
>     enum SEVERITY {
>         UNDEFINED = 0x0,
>         INFO = 0x1,
>         WARNING = 0x2,
>         RPT_ERROR = 0x4,
>         ACTION = 0x8
>     };
> 
> to fix it.
> 
> keywords like UNDEFINED, INFO, WARNING , ERROR are widely used, the
> risk of collision is high.
> Usually I use something like:
> RPT_UNDEFINED, RPT_INFO , RPT_WARNING , RPT_ERROR
> to avoid this risk.
> 
> Thanks.
> 

If we are going to use the RPT_ prefix to resolve the conflict on
windows, I prefer that it be used for all of the enums for readability.
 Either this or a namespace.  I really don't have a preference.

Thanks,

Wayne


References