diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-03-20 20:45:27 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-22 18:59:45 +0100 |
commit | 349c0de0912884388f2490d4bfd6905424ccf194 (patch) | |
tree | a939e29f8ab31b2a90a0d2d9b67094f0375c901b /src/corelib/json/qjson.cpp | |
parent | 8dd18751e18ef9509729cbaca6ca5e6810729e2c (diff) |
Significantly speed up insertion into QJsonObject/Array
The code was only allocating memory for the next insertion
leading to a reallocation of the whole data for every
single insertion.
The code now reserves some space and uses a decent growth
strategy to avoid repeated reallocs.
Change-Id: I48b0feab71ba8ca73e7037f8460080f198b2f009
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
Diffstat (limited to 'src/corelib/json/qjson.cpp')
-rw-r--r-- | src/corelib/json/qjson.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/corelib/json/qjson.cpp b/src/corelib/json/qjson.cpp index 4f7372a6c0..26f26b211e 100644 --- a/src/corelib/json/qjson.cpp +++ b/src/corelib/json/qjson.cpp @@ -241,14 +241,6 @@ bool Entry::operator ==(const QString &key) const return (shallowKey() == key); } -bool Entry::operator >=(const QString &key) const -{ - if (value.latinKey) - return (shallowLatin1Key() >= key); - else - return (shallowKey() >= key); -} - bool Entry::operator ==(const Entry &other) const { if (value.latinKey) { |