From d305038c27514efe0ee986f5995f03ce218e94dc Mon Sep 17 00:00:00 2001 From: David Williams Date: Wed, 11 Mar 2015 23:47:32 +0100 Subject: [PATCH] Replaced loop with fill. --- include/PolyVox/Vector.h | 2 ++ include/PolyVox/Vector.inl | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/PolyVox/Vector.h b/include/PolyVox/Vector.h index 695ce8c0..d8918516 100644 --- a/include/PolyVox/Vector.h +++ b/include/PolyVox/Vector.h @@ -29,10 +29,12 @@ freely, subject to the following restrictions: #include "PolyVoxForwardDeclarations.h" +#include #include #include #include #include +#include namespace PolyVox { diff --git a/include/PolyVox/Vector.inl b/include/PolyVox/Vector.inl index d03ae025..562c0fca 100644 --- a/include/PolyVox/Vector.inl +++ b/include/PolyVox/Vector.inl @@ -39,10 +39,7 @@ namespace PolyVox template Vector::Vector(StorageType tFillValue) { - for(uint32_t ct = 0; ct < Size; ct++) - { - m_tElements[ct] = tFillValue; - } + std::fill(m_tElements, m_tElements + Size, tFillValue); } /**