[PATCH] add SAL_WARN_UNUSED_RESULT in OString and OUString where app...
Norbert Thiebaud (via Code Review)
gerrit at gerrit.libreoffice.org
Wed Nov 28 02:01:50 PST 2012
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1186
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/86/1186/1
add SAL_WARN_UNUSED_RESULT in OString and OUString where appropriate
String used to do some operation by modifying itself
whereas OUString never does that and when a modificaiton is needed
it create a new copy.
so it is very easy when one convert String code to OUString code to
miss stuff like
sString.ToUpperCase()
which need to be converted into
sString = sString.toAsciiUpperCase()
and not
sString.toAsciiUpperCase()
This patch make the compiler generate a warning in that later _wrong_ case
Change-Id: I4a9c0b4c7d0b75ad8850ac23b86e8508a334f5fe
---
M sal/inc/rtl/string.hxx
M sal/inc/rtl/ustring.hxx
2 files changed, 18 insertions(+), 18 deletions(-)
--
To view, visit https://gerrit.libreoffice.org/1186
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a9c0b4c7d0b75ad8850ac23b86e8508a334f5fe
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Norbert Thiebaud <nthiebaud at gmail.com>
More information about the LibreOffice
mailing list