forked from qt-creator/qt-creator
Utils: Use brace initialization instead of constructor and 0
Calling T(0) for value types can lead to unexpected results. Using brace initialization ensures we use value initialization or the default constructor. Change-Id: Ic33b186eebb1b37017d425ffca9bcf5d26df31d4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -110,7 +110,7 @@ public:
|
|||||||
|
|
||||||
void fillWithZero()
|
void fillWithZero()
|
||||||
{
|
{
|
||||||
std::array<T, MaxSize>::fill(T(0));
|
std::array<T, MaxSize>::fill(T{});
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user