summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/clover/util/compat.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/util/compat.hpp b/src/gallium/state_trackers/clover/util/compat.hpp
index 73055775293..ca5b8921a40 100644
--- a/src/gallium/state_trackers/clover/util/compat.hpp
+++ b/src/gallium/state_trackers/clover/util/compat.hpp
@@ -80,8 +80,10 @@ namespace clover {
template<typename C>
vector(const C &v) :
- p(alloc(v.size(), &*v.begin(), v.size())),
- _size(v.size()) , _capacity(v.size()) {
+ p(alloc(v.size(), NULL, 0)), _size(0),
+ _capacity(v.size()) {
+ for (typename C::const_iterator it = v.begin(); it != v.end(); ++it)
+ new(&p[_size++]) T(*it);
}
~vector() {