Converted first thing to shared pointers.
This commit is contained in:
@ -15,31 +15,7 @@ namespace Dawn {
|
||||
* @param append Pointer to list that will be appended.
|
||||
*/
|
||||
template<typename T>
|
||||
void vectorAppend(std::vector<T> *list, std::vector<T> *append) {
|
||||
assertNotNull(list, "vectorAppend: list cannot be null");
|
||||
assertNotNull(append, "vectorAppend: append cannot be null");
|
||||
|
||||
auto it = append->begin();
|
||||
while(it != append->end()) {
|
||||
list->push_back(*it);
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Append a list on to another list.
|
||||
*
|
||||
* @param list Pointer to list that is being appended to.
|
||||
* @param append List that will be appended.
|
||||
*/
|
||||
template<typename T>
|
||||
void vectorAppend(std::vector<T> *list, std::vector<T> append) {
|
||||
assertNotNull(list, "vectorAppend: list cannot be null");
|
||||
|
||||
auto it = append.begin();
|
||||
while(it != append.end()) {
|
||||
list->push_back(*it);
|
||||
++it;
|
||||
}
|
||||
void vectorAppend(std::vector<T> &list, const std::vector<T> &append) {
|
||||
list.insert(list.end(), append.begin(), append.end());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user