Converted first thing to shared pointers.

This commit is contained in:
2023-11-02 20:35:11 -05:00
parent 5547c7c236
commit 0beb1d9cb7
17 changed files with 37 additions and 67 deletions

View File

@ -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());
}
}