On 27.02.2012 19:01, Michael Meeks wrote:
Having said that I'm not hyper-happy with not initialising the vector's
contents - don't we really want:
std::vector<sal_uInt16> aWish( aTablCols.Count() + 1, 0 ),
aMins( aTabCols.Count() + 1, 0 );
Hmm, no...
From C++ standart (8.5, cl. 5):
To default-initialize an object of type T means:
— if T is a non-POD class type (clause 9), the default constructor for T is
called (and the initialization is
ill-formed if T has no accessible default constructor);
— if T is an array type, each element is default-initialized;
— otherwise, the storage for the object is zero-initialized.
and vector has
explicit vector(size_type n, const T& value = T(), const Allocator& =
Allocator());
so, there will be zeroes by default.
Regards,
Ivan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice