diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-10 19:29:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-10 21:19:24 +0200 |
commit | 9490588c2460a77c16aacd52b7f449db60a6b34b (patch) | |
tree | 76860cb6ed37ef3804253d93eaefe0c22f0eb489 /tools/source/misc | |
parent | e8c940b73840868f26a537e159047e99d7ddae2c (diff) |
clang:optin.performance.Padding in tools
Excessive padding in 'class tools::JsonWriter' (15 padding bytes, where
7 is optimal).
Change-Id: I7e37eec095d935a344b2e5fea7bb108ee878472a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121920
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source/misc')
-rw-r--r-- | tools/source/misc/json_writer.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/source/misc/json_writer.cxx b/tools/source/misc/json_writer.cxx index c326201eb9e5..b6482329ea55 100644 --- a/tools/source/misc/json_writer.cxx +++ b/tools/source/misc/json_writer.cxx @@ -21,10 +21,10 @@ namespace tools constexpr int DEFAULT_BUFFER_SIZE = 2048; JsonWriter::JsonWriter() - : mSpaceAllocated(DEFAULT_BUFFER_SIZE) - , mpBuffer(static_cast<char*>(malloc(mSpaceAllocated))) - , mStartNodeCount(0) + : mpBuffer(static_cast<char*>(malloc(DEFAULT_BUFFER_SIZE))) , mPos(mpBuffer) + , mSpaceAllocated(DEFAULT_BUFFER_SIZE) + , mStartNodeCount(0) , mbFirstFieldInNode(true) { *mPos = '{'; |