summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2014-10-08 20:01:26 +0300
committerFrancisco Jerez <[email protected]>2014-10-20 10:33:01 +0300
commit1441a3c1bba542f318cfc0f4468ef34f97121a1d (patch)
tree522b5525b355862fc45b31643e605861ce816e4f /src/gallium
parent73dd50acf6d244979c2a657906aa56d3ac60d550 (diff)
clover/util: Fix construction of compat::vector with a general container as argument.
Diffstat (limited to 'src/gallium')
-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() {