The meaning of CustomVariantValue::Compare is ambiguous. What does returning true indicate? From the Variant::operator == code (below) we can infer that true means equal, but from the name and documentation within CustomVariantValue it is not obvious whether true means "Equal" or "Less", etc.
At the very least, the documentation should be improved. Alternatively, the function name could be changed to Equals, which would itself clear up the ambiguity.
The meaning of
CustomVariantValue::Compare
is ambiguous. What does returning true indicate? From theVariant::operator ==
code (below) we can infer thattrue
means equal, but from the name and documentation withinCustomVariantValue
it is not obvious whethertrue
means "Equal" or "Less", etc.https://github.com/u3d-community/U3D/blob/4903fa5b3a042e9d2cb0037041a6fb9cc78aa87c/Source/Urho3D/Core/Variant.cpp#L150-L155
At the very least, the documentation should be improved. Alternatively, the function name could be changed to
Equals
, which would itself clear up the ambiguity.