On 10/16/2013 03:35 AM, Amos Jeffries wrote:
>>> To aid the conversion of String to SBuf,
>>>
>>> It appears that all code using String::undefined() for boolean tests can
>>> remain logically consistent using checks on string size() instead.
>>> This helps by removing part of the
>>> undefined-empty/defined-empty/0-length-empty string state
>>> differentiation.
I did not find any problems with the replacements. Unfortunately, I
cannot tell for sure whether zero size() is indeed equivalent to
!defined() in all those cases, but if you think they are probably
equivalent, that is good enough for me.
IMHO, it would have been better to replace undefined() with !size(),
rather than "size() == 0", but this is just a style preference, not an
objection.
Cheers,
Alex.
Received on Thu Oct 31 2013 - 17:46:36 MDT
This archive was generated by hypermail 2.2.0 : Fri Nov 01 2013 - 12:00:16 MDT