Re: [Kicad-developers] [PATCH] compile broken on clang - overload conflict

2015-06-08 Thread Wayne Stambaugh
GCC was still generating a warning using the reference as well so I applied your patch in r5722. Thanks, Wayne On 6/8/2015 10:08 AM, Chris Pavlina wrote: > Nope, using a by-reference parameter does not appease clang; no idea about > MSVC. > > > On Mon, Jun 08, 2015 at 09:15:16AM -0400, Wayne

Re: [Kicad-developers] [PATCH] compile broken on clang - overload conflict

2015-06-08 Thread Chris Pavlina
Nope, using a by-reference parameter does not appease clang; no idea about MSVC. On Mon, Jun 08, 2015 at 09:15:16AM -0400, Wayne Stambaugh wrote: > On 6/8/2015 8:58 AM, Chris Pavlina wrote: > > It can't and it shouldn't - gcc is the one at fault here. wxString > > provides the constructor: > >

Re: [Kicad-developers] [PATCH] compile broken on clang - overload conflict

2015-06-08 Thread Chris Pavlina
One is a search and the other is a direct access by index. It's an academic discussion anyway - as long as the conflict is resolved somehow so that kicad compiling doesn't depend on a gcc quirk, I'm happy. On Mon, Jun 08, 2015 at 09:15:16AM -0400, Wayne Stambaugh wrote: > On 6/8/2015 8:58 AM,

Re: [Kicad-developers] [PATCH] compile broken on clang - overload conflict

2015-06-08 Thread Wayne Stambaugh
On 6/8/2015 8:58 AM, Chris Pavlina wrote: > It can't and it shouldn't - gcc is the one at fault here. wxString > provides the constructor: > > wxString(char ch, size_t nRepeat=1) > > which is the one in question, I believe, as the integer literal can also > represent a character. > > Using a r

Re: [Kicad-developers] [PATCH] compile broken on clang - overload conflict

2015-06-08 Thread Chris Pavlina
It can't and it shouldn't - gcc is the one at fault here. wxString provides the constructor: wxString(char ch, size_t nRepeat=1) which is the one in question, I believe, as the integer literal can also represent a character. Using a reference should work too, though changing the name is a more

Re: [Kicad-developers] [PATCH] compile broken on clang - overload conflict

2015-06-08 Thread Wayne Stambaugh
Really! Clang can't differentiate between SCH_SHEET_LIST::GetSheet(const wxString, bool); and SCH_SHEET_LIST::GetSheet(int); How can these two definitions be ambiguous? Does using a reference to the wxString instead of passing the entire string on the stack fix the problem? If so, I would pr

[Kicad-developers] [PATCH] compile broken on clang - overload conflict

2015-06-07 Thread Chris Pavlina
5720 broke the build on clang by making SCH_SHEET_LIST::GetSheet(int) a const method, which changed the overload resolution order and resulted in failure due to ambiguity. This patch ranames SCH_SHEET_LIST::GetSheet(const wxString, bool) to ::GetSheetByPath to resolve that conflict. -- Chris c