https://codereview.appspot.com/259210043/diff/1/lily/semi-tie.cc File lily/semi-tie.cc (right): https://codereview.appspot.com/259210043/diff/1/lily/semi-tie.cc#newcode102 lily/semi-tie.cc:102: return false; This may sound facetious and your code ...
8 years, 9 months ago
(2015-08-08 17:05:40 UTC)
#2
https://codereview.appspot.com/259210043/diff/1/lily/semi-tie.cc
File lily/semi-tie.cc (right):
https://codereview.appspot.com/259210043/diff/1/lily/semi-tie.cc#newcode102
lily/semi-tie.cc:102: return false;
This may sound facetious and your code corresponds to the previous code, but if
you return false here, you can have both a < b and b < a which may confuse some
sorting algorithms. In the interest of causing minimal followup damage, I'd
return true for this (but not the previous) return statement. This puts
uncastable items at a defined place in sort order (last) while not claiming a <
a (because if both items are uncastable, the first return statement will return
false already).
Issue 259210043: Issue 4545: Use Grob::programming_error in Semi_tie:: and Tie::less
(Closed)
Created 8 years, 9 months ago by Dan Eble
Modified 8 years, 8 months ago
Reviewers: dak
Base URL:
Comments: 1