Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Sunday 15 of April 2012, Rafael Dominguez wrote:
Here are the patching fixing the issues you pointed me out.

 Yes, good, pushed, thanks again.

 One thing I didn't mention explicitly when talking about the named return 
value optimization was that it is done only if the named return variable is 
actually needed. If all return statements are expressions invoking 
constructors, then the named variable is not needed and the (non-named) 
return value optimization takes care of avoiding copies as well. So 
SdInsertPagesObjsDlg::GetList() can simply do

if( ... )
    return std::vector<rtl::OUString>();
return aLbTree.GetSelectEntryList( nType );

which will avoid the copy when calling the other function as well, and the 
function is not called at all when not needed. I tweaked that before 
committing, now it's perfect :).

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.