[Libreoffice] [REVIEW] svgwriter SVGActionWriter::ImplWriteText uses auto_prt with new[]

julien2412 serval2412 at yahoo.fr
Sat Sep 3 01:43:43 PDT 2011


Hello,

Cppcheck detected the use of an auto_ptr with new [] in
filter/source/svg/svgwriter.cxx (line 1145). Since, auto_ptr shouldn't be
used with new[] because it always does a delete (and not a delete[] in this
case), the code should be changed. So I thought about using
boost::shared_array.

I attached a patch. Is this one correct ? (if yes, I can of course commit
and push it on master).

Julien. http://nabble.documentfoundation.org/file/n3306210/patch_svg.txt
patch_svg.txt 

--
View this message in context: http://nabble.documentfoundation.org/REVIEW-svgwriter-SVGActionWriter-ImplWriteText-uses-auto-prt-with-new-tp3306210p3306210.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list