OUString::isEmpty()
Chris Sherlock
chris.sherlock79 at gmail.com
Fri Jan 15 20:20:56 PST 2016
I’m sure I’m not doing something correctly, but when isEmpty() seems to be doing something odd on new OUString objects.
The following is a code snippet that highlights the issue:
OUString aString;
if (aString.isEmpty())
cout << “Detected as empty”;
else
cout << “Not detected as empty”;
That gives me “Not detected as empty”.
So I wrote a unit test, and it’s failing.
You can see the unit test here:
https://gerrit.libreoffice.org/#/c/21506/
Same basic thing - the test fails!
Any ideas what is going on here? My understanding was that if you create a new OUString then it should initialize itself to an empty string. That doesn’t seem to be occuring...
Chris
More information about the LibreOffice
mailing list