// Copyright (c) 2022 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "dawnlibs.hpp" #include "assert/assert.hpp" namespace Dawn { /** * Append a list on to another list. * * @param list Pointer to list that is being appended to. * @param append Pointer to list that will be appended. */ template void vectorAppend(std::vector *list, std::vector *append) { assertNotNull(list); assertNotNull(append); 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 void vectorAppend(std::vector *list, std::vector append) { assertNotNull(list); auto it = append.begin(); while(it != append.end()) { list->push_back(*it); ++it; } } }