On 31 Aug 2008, at 21:57, Tim Moore wrote: > I guess you're not using map::lower_bound because you want to > support an > arbitrary ordering different from the map? What will the lower bound > result mean > in that case?
Actually my logic is busted anyway, I was hoping to avoid a linear search of the data in the case where there's a custom ordering, but it's harder than I allowed for. So the current logic is not right anyway, and I have a fix pending for that. Of course it only affects the KLN89b in any case, and I have the feeling that my 'FGIdentOrdering' solution is too general. In the longer run, I have two potential fixes: - allow a device with custom ordering to create a private ordering table (effectively a second index, i.e another map) - this only works if all the 'things' in the map are pointer-based instead of struct- based, which is one of the things I'm doing in my FGPositioned hacking OR - just make all idents in all FG ordered the KLN89b way, since other docs I've seen have hinted that this ordering is standard in the aviation world. If someone ever needs some truly byzantine ordering, I'd need to rethink that approach, but it's the simplest and most efficient, so seems quite suitable unless anyone can present a compelling reason against it. James ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel