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


On 22/11/2019 16:44, Kaganski Mike wrote:
On 22.11.2019 18:31, julien2412 wrote:
Taking a look at cppcheck report, I noticed this kind of reports:
vcl/source/treelist/transfer.cxx
132     useStlAlgorithm 398     style   Consider using std::fill algorithm instead of
a raw loop

To use std::fill, we'd need to convert the C array into std::array.
I don't see why is the conversion required specifically for using STL. A
pointer inside the array is a perfect iterator, that STL can use. (No
objections against conversion where it has benefits :-))

Indeed! I thought STL needed iterators only but reading this https://stackoverflow.com/questions/1065774/initialization-of-a-normal-array-with-one-default-value, it's not the case.

Thank you for your feedback Mike!

Julien


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.