← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: fix strange string concatenation in component_tree_search_container.cpp

 

----- Original Message -----

> From: Henner Zeller <h.zeller@xxxxxxx>
> To: Cirilo Bernardo <cirilo_bernardo@xxxxxxxxx>
> Cc: Ki Cad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Sent: Sunday, February 23, 2014 9:03 AM
> Subject: Re: [Kicad-developers] PATCH: fix strange string concatenation in component_tree_search_container.cpp
> 
> On 22 February 2014 13:55, Cirilo Bernardo <cirilo_bernardo@xxxxxxxxx> 
> wrote:
>>  In the last commit there was a strange string concatenation which
>>  would not build on my machine:
>> 
>>  _("Unit") + wxT( " " ) + unitName
>> 
>> 
>>  This patch breaks the operation into 2 steps, first defining the
>>  wxString "Unit " and concatenating the name.
> 
> Thanks for the fix (What is the platform you were testing this on ?)
> 
> Good for one of the maintainers to apply.
> 
> 
> -h
> 

I'm using Debian Linux ('sid' as usual - he's always breaking things).
I'm surprised any gcc compiler would build with such a construct though.
Maybe the macros changed at some time and the compiler could build it.
Still, there is not necessarily even a guarantee that _() and wxT() yield
the same result. Magic string concatenation is always a nightmare,
regardless of compiler.

- Cirilo



References