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, 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 reference should work too, though changing the name is a more > > common solution (and better IMHO) particularly considering the two > > methods do provide slightly different functions. > > I would think that searching a list with a string vs. an index is pretty > self explanatory but maybe I've been doing this too long :) > > > > > Apparently MSVC won't compile it either. > > > > On Mon, Jun 08, 2015 at 08:50:15AM -0400, Wayne Stambaugh wrote: > >> 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 prefer that fix. > >> > >> On 6/7/2015 9:17 PM, Chris Pavlina wrote: > >>> 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 > >>> > >>> > >>> > >>> _______________________________________________ > >>> Mailing list: https://launchpad.net/~kicad-developers > >>> Post to : kicad-developers@lists.launchpad.net > >>> Unsubscribe : https://launchpad.net/~kicad-developers > >>> More help : https://help.launchpad.net/ListHelp > >>> > >> > >> _______________________________________________ > >> Mailing list: https://launchpad.net/~kicad-developers > >> Post to : kicad-developers@lists.launchpad.net > >> Unsubscribe : https://launchpad.net/~kicad-developers > >> More help : https://help.launchpad.net/ListHelp > > > > _______________________________________________ > > Mailing list: https://launchpad.net/~kicad-developers > > Post to : kicad-developers@lists.launchpad.net > > Unsubscribe : https://launchpad.net/~kicad-developers > > More help : https://help.launchpad.net/ListHelp > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp