diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-03-12 16:04:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-03-15 09:25:27 +0100 |
commit | 5d83d14ef8e3a149f2dbcddc18a70edda021fbfe (patch) | |
tree | f52abad9c5eabe338f16e99e432354b8a66205f9 /formula | |
parent | 0a900287cff32c7fd94f498f8077a3a2d162e131 (diff) |
Clarify that rtl::ToStringHelper::length must be precise
d87f5d30879aca73fff271c254589fc41a91fdd0 "support for fast O(U)String
concatenation using operator+", introducing rtl::ToStringHelper, had intended
that length can return an optimistic maximum value if the exact value cannot be
determined (e.g., when creating the textual representation of a numerical value
only on the fly, not upfront), witness the comments removed now, but never made
use of that, always returning precise values from the various
rtl::ToStringHelper::length specializations.
And then cbe3b2fe0b9d745e22a2bf436ce55141b15f9502 "Avoid conversion warning in
O[U]String[Buffer] constructors", not being aware that length could
theoretically return an imprecise value, made certain code rely on it always
returning a precise value.
So clarify the status quo, that length always returns a precise value. (See
also the discussion in the comments of abandoned
<https://gerrit.libreoffice.org/c/core/+/110129> "Drop obsolete comments".)
Change-Id: I7dc72e9e15304779cc4d2edc01331959b6fbe869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112397
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'formula')
0 files changed, 0 insertions, 0 deletions