[REVIEW 3.5.1 (?)] fdo#46144: "Distributy Columns Evenly" does not work with the selected columns

Ivan Timofeev timofeev.i.s at gmail.com
Mon Feb 27 07:46:51 PST 2012


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


More information about the LibreOffice mailing list