summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qxmlstream.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-05-24 20:04:03 -0300
committerMårten Nordheim <marten.nordheim@qt.io>2024-05-25 15:14:20 +0000
commit56568fdee66ee30fd6d0afdd2a60c9355aba759c (patch)
tree700573e7a776cda3931a044e354dc3846af78f13 /src/corelib/serialization/qxmlstream.cpp
parent6c7738a7d61178cbc809f441bdcd8345c43ba1ca (diff)
QByteArray::setNum: use assign() instead of clear()+append()HEADdev
clear() will shed any stored capacity, so that's a waste for the few people who actually use setNum(). The majority use it from number(), in which case the clear() is superfluous anyway. And append() does an extra strlen() check, which we don't need. This considerably reduces the size of both QByteArray::setNum() in a GCC LTO build (though the compiler chose to not inline assign()). Moreover, it now does inline setNum() in the number() functions and in a lot more places (searching for "qulltoa2" in the disassembly finds it in QFileSystemEngine::id, for example). Change-Id: If3345151ddf84c43a4f1fffd17d28f2fc79aa072 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/serialization/qxmlstream.cpp')
0 files changed, 0 insertions, 0 deletions