mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 03:00:24 +01:00
clover/util: Fix construction of compat::vector with a general container as argument.
This commit is contained in:
parent
73dd50acf6
commit
1441a3c1bb
1 changed files with 4 additions and 2 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue