diff options
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-array.h | 17 | ||||
| -rw-r--r-- | source/core/slang-short-list.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/source/core/slang-array.h b/source/core/slang-array.h index 2647e163f..8d22e1848 100644 --- a/source/core/slang-array.h +++ b/source/core/slang-array.h @@ -125,6 +125,23 @@ namespace Slang insertArray(rs, args...); return rs; } + + + template<typename TList> + void addToList(TList&) + { + } + template<typename TList, typename T> + void addToList(TList& list, T node) + { + list.add(node); + } + template<typename TList, typename T, typename ... TArgs> + void addToList(TList& list, T node, TArgs ... args) + { + list.add(node); + addToList(list, args...); + } } #endif diff --git a/source/core/slang-short-list.h b/source/core/slang-short-list.h index 7d51a8abf..5bad9faf8 100644 --- a/source/core/slang-short-list.h +++ b/source/core/slang-short-list.h @@ -288,6 +288,8 @@ namespace Slang void addRange(ArrayView<T> list) { addRange(list.m_buffer, list.m_count); } + void addRange(ConstArrayView<T> list) { addRange(list.m_buffer, list.m_count); } + template<int _otherShortListSize, typename TOtherAllocator> void addRange(const ShortList<T, _otherShortListSize, TOtherAllocator>& list) { |
