mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Lua: allow to reserve STL vector size
This commit is contained in:
parent
72522dd05d
commit
f2c5f9da25
1 changed files with 2 additions and 0 deletions
|
|
@ -2092,10 +2092,12 @@ public:
|
|||
Class<std::vector<T> > beginStdVector (char const* name)
|
||||
{
|
||||
typedef std::vector<T> LT;
|
||||
typedef typename std::vector<T>::size_type T_SIZE;
|
||||
return beginConstStdVector<T> (name)
|
||||
.addVoidConstructor ()
|
||||
.addFunction ("push_back", (void (LT::*)(const T&))<::push_back)
|
||||
.addFunction ("clear", (void (LT::*)())<::clear)
|
||||
.addFunction ("reserve", (void (LT::*)(T_SIZE))<::reserve)
|
||||
.addExtCFunction ("to_array", &CFunc::vectorToArray<T, LT>)
|
||||
.addExtCFunction ("add", &CFunc::tableToList<T, LT>);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue