summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-02-01 09:24:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-02-01 09:51:15 +0000
commit6028e9fda96d0ed5da266b1c54a7755f7ba3408c (patch)
tree3004c26ffa55c2793077ad1528247953b4dbe0a7
parentd8de2dc3c55a9013a71167c8058a333e7221a6a0 (diff)
Finally drop undocumented rtl_[u]String_newFromStr null argument support
...executing on the TODO left by 4f0c70fb5554325e0cc2129741175bf07de22029 "Avoid calling OString ctor with null pointer" in late 2020. Change-Id: I3db6e2df61ca290948affc5e02ae74757441471d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146428 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--sal/rtl/strtmpl.hxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx
index eb9371219178..a814f4998a43 100644
--- a/sal/rtl/strtmpl.hxx
+++ b/sal/rtl/strtmpl.hxx
@@ -982,16 +982,7 @@ template <typename IMPL_RTL_STRINGDATA>
void newFromStr ( IMPL_RTL_STRINGDATA** ppThis,
const STRCODE<IMPL_RTL_STRINGDATA>* pCharStr )
{
-#if OSL_DEBUG_LEVEL > 0
- //TODO: For now, only abort in non-production debug builds; once all places that rely on the
- // undocumented newFromStr behavior of treating a null pCharStr like an empty string have been
- // found and fixed, drop support for that behavior and turn this into a general assert:
- if (pCharStr == nullptr) {
- std::abort();
- }
-#endif
-
- newFromStr_WithLength(ppThis, pCharStr, pCharStr ? getLength(pCharStr) : 0);
+ newFromStr_WithLength(ppThis, pCharStr, getLength(pCharStr));
}
/* ----------------------------------------------------------------------- */