← Back to team overview

kicad-developers team mailing list archive

Re: [Bug 1250876] Re: DisplayError / tool_manager.cpp compile failure

 

On 11/13/2013 11:46 AM, Dick Hollenbeck wrote:
> On 11/13/2013 09:28 AM, Wayne Stambaugh wrote:
>> Fix committed in r4463.
>>
>> ** Changed in: kicad
>>        Status: New => Fix Committed
>>
> 
> tool_manager.cpp:
> 
> line 142 is using concatonation against a format string, this is a bug.
> 
> If you want formatting, we need wxString::Format() or the new std::string StrPrintf() or
> similar.
> 
> If the format string is not going to be translated, then there are savings by going down
> to an 8 bit string.  On linux, wxT() creates a 32 bit string, which takes up 4 times the
> memory of an 8 bit string.
> 
> 
> Further consideration has us anticipating a transition to wx 3.x on all platforms, at
> which point we can remove all wxT() instances, supposedly.  That also will be a transition
> to 8 bit constant strings, one we have to wait for.
> 
> So there are two paths forward, both sensible, one you have to wait for.
> 
> The deciding factor for me is that aTool->GetName() returns
> 
>    const std::string&
> 
> so we start with an 8 bit string.
> 
> So I offer the attached patch.
> 

I missed this before but doesn't the string in this patch need to
translated with _()?  Previously, these messages were dumped to a wxLog
so only developers would see them but now they are being displayed to
the user by the call to DisplayError().




Follow ups

References