Simplify conditionals
authorJoão Abecasis <joao.abecasis@nokia.com>
Wed, 4 Apr 2012 12:11:14 +0000 (14:11 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 4 Apr 2012 23:45:10 +0000 (01:45 +0200)
commit98e50a18eda614caeadaeb7a05fc2f5ab4f735e7
tree0e14d750bfb4bafe835b15e9e92f24f097eff300
parent3669ceb77968e55225fecc7f4232b5545c98a69b
Simplify conditionals

alloc >= size is an invariant of both QString and QByteArray, unless
string data is immutable (e.g., when using fromRawData()), in which case
alloc will be 0, regardless of size, That's what needs to be checked
here.

Change-Id: Ief9e6a52a1d5ea1941d23ed3c141edfd15d2a6a7
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/tools/qbytearray.cpp
src/corelib/tools/qstring.cpp