(svn r23634) -Add: support language files for GameScript (Rubidium)

This commit is contained in:
truebrain
2011-12-19 21:05:46 +00:00
parent 20bc2efeba
commit f1f0776efd
13 changed files with 593 additions and 0 deletions

View File

@@ -326,6 +326,37 @@ public:
}
};
/**
* Simple vector template class, with automatic delete.
*
* @note There are no asserts in the class so you have
* to care about that you grab an item which is
* inside the list.
*
* @param T The type of the items stored, must be a pointer
* @param S The steps of allocation
*/
template <typename T, uint S>
class AutoDeleteSmallVector : public SmallVector<T, S> {
public:
~AutoDeleteSmallVector()
{
this->Clear();
}
/**
* Remove all items from the list.
*/
FORCEINLINE void Clear()
{
for (uint i = 0; i < this->items; i++) {
delete this->data[i];
}
this->items = 0;
}
};
typedef AutoFreeSmallVector<char*, 4> StringList; ///< Type for a list of strings.
#endif /* SMALLVEC_TYPE_HPP */