diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-10-17 20:33:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-21 08:36:01 +0200 |
commit | 0f874472c672175135520101837ff0c9d4701d7f (patch) | |
tree | fa6a504bdfc7d5d838caed7cfb87793321797290 /unoidl | |
parent | 9112c18524c9f5e67d6cbb282586a439e3020cdb (diff) |
size some stringbuffer to prevent re-alloc
found by the simple expidient of putting asserts in
the resize routine. Where an explicit const size is used,
I started with 32 and kept doubling until that site
did not need resizing anymore.
Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4
Reviewed-on: https://gerrit.libreoffice.org/81138
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/sourceprovider-parser.y | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index 5fb347099ced..d7111d0e3cfa 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -4028,7 +4028,8 @@ OUString SourceProviderType::getName() const { return name; case unoidl::detail::SourceProviderType::TYPE_INSTANTIATED_POLYMORPHIC_STRUCT: { - OUStringBuffer n(name + "<"); + OUStringBuffer n(512); + n.append(name + "<"); for (auto i(subtypes.begin()); i != subtypes.end(); ++i) { if (i != subtypes.begin()) { n.append(","); |