← Back to team overview

kicad-developers team mailing list archive

Re: Pushed change

 

Cool.  I’ll fix it up.

Cheers,
Jeff.

> On 12 Mar 2018, at 20:07, jp charras <jp.charras@xxxxxxxxxx> wrote:
> 
> Le 12/03/2018 à 20:53, Jeff Young a écrit :
>> Hi JP,
>> 
>>> On 12 Mar 2018, at 19:40, jp charras <jp.charras@xxxxxxxxxx> wrote:
>>> 
>>> Le 12/03/2018 à 20:19, Jeff Young a écrit :
>>>> Hi folks,
>>>> 
>>>> I just pushed a change which removes a bunch of unnecessary boilerplate.
>>>> 
>>>> But it occurs to me that maybe it’s necessary with pickier compilers?  Anyway, if someone could try it on Windows and/or Unix that would be great.
>>>> 
>>>> Cheers,
>>>> Jeff.
>>>> 
>>> Hi Jeff,
>>> 
>>> You fixes can create issues because:
>>> 
>>> fn.IsFileWritable() ? wxEmptyString : _( " [Read Only]" )
>>> creates issues because wxEmptyString does not return a wxString, but _( " [Read Only]" ) that is a
>>> macro for wxGetTranslation( " [Read Only]" ) returns a wxString
>> 
>> Sure, but they’re getting fed to varargs.  Do any compilers actually bark?  (Mine doesn’t, but that doesn’t mean much.)
> 
> gcc 6.3 on msys2 (and certainly gcc 4.8 on Kubuntu 14.04 LST) complains:
> E:/kicad-launchpad/testing_git/pcbnew/footprint_edit_frame.cpp:802:28: error: operands to ?: have
> different types 'const wxChar* {aka const wchar_t*}' and  'const wxString'
>                   writable ? wxEmptyString : _( " [Read Only]" ),
> 
>> 
>>> 
>>> and
>>> 
>>> title.Printf( _( "Eeschema \u2014 %s" ), GetChars( GetScreen()->GetFileName() ) );
>>> 
>>> is incorrect because the string inside _() *must be* a ASCII7 string.
>>> This is mandatory for translation tools.
>> 
>> Oops.  Missed that one.
>> 
>> Thanks,
>> Jeff.
>> 
> 
> -- 
> Jean-Pierre CHARRAS


References