~measurement-factory/squid/ftp-native

Viewing all changes in revision 12809.

  • Committer: Alex Rousskov
  • Date: 2014-08-07 17:13:26 UTC
  • Revision ID: rousskov@measurement-factory.com-20140807171326-up0jnci1otzudcwr
Do not allow SBuf::toLower/toUpper() return a value. 

Some callers think toLower() method changes the string and some think it
returns a changed value without changing the string. Without unportable hacks
like __attribute__((warn_unused_result)), some of the callers will guess wrong
and not know about it. It is easier/safer to change the object itself and
return nothing. 

Provided ToUpper/ToLower() functions (not methods!) that preserve their
paramter and return a new object for callers that need the old functionality.
These functions are a good candidate for __attribute__ hacks.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: