https://bugs.freedesktop.org/show_bug.cgi?id=86023
Bug ID: 86023
Summary: O[U]String needs a 'clear' method ...
Product: LibreOffice
Version: 4.3.0.2 rc
Hardware: Other
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: framework
Assignee: [email protected]
Reporter: [email protected]
Just looking at a profile, I was struck by the cost of:
OUString aStr;
...
aStr = OUString();
Where we use the assignment to clear aStr; this in-lines a construction, a
de-reference and an assign call ;-) it is done quite a bit too:
git grep ' = OUString()' | nl
it'd be nice to have the obvious cleanup implement a 'clear()' method on
OString and OUString thus include/rtl/ustring.hxx and rtl/string.hxx
void clear()
{
rtl_uString_new( &pData );
}
And then cleanup the call-sites I guess =)
Thanks !
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs