summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2021-02-19 15:04:06 +0100
committerPaul Lemire <paul.lemire@kdab.com>2021-02-25 07:24:36 +0100
commit046284092930aa94477af79e984e2567c5a7bd79 (patch)
tree6733c68b738e47d2d28c63b413798cb5fe8ef44a /src
parent52f094b767e8f57997a3ee360a5dca5e36efa761 (diff)
vector_helper: suggest compiler to inline all the functions
Change-Id: Id70f3e2633165aac26fceb3bb44194ed77f89d23 Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/vector_helper_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/vector_helper_p.h b/src/core/vector_helper_p.h
index 327ca0bce..cd7dc55a9 100644
--- a/src/core/vector_helper_p.h
+++ b/src/core/vector_helper_p.h
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
namespace Qt3DCore {
template<typename T, typename U>
-void moveAtEnd(std::vector<T>& destination, std::vector<U>&& source)
+inline void moveAtEnd(std::vector<T>& destination, std::vector<U>&& source)
{
destination.insert(destination.end(),
std::make_move_iterator(source.begin()),
@@ -77,7 +77,7 @@ inline T moveAndClear(T &data)
}
template<typename T, typename U>
-void append(std::vector<T>& destination, const U& source)
+inline void append(std::vector<T>& destination, const U& source)
{
destination.insert(destination.end(),
source.cbegin(),
@@ -85,13 +85,13 @@ void append(std::vector<T>& destination, const U& source)
}
template<typename T, typename U>
-bool contains(const std::vector<T>& destination, const U& element) noexcept
+inline bool contains(const std::vector<T>& destination, const U& element) noexcept
{
return std::find(destination.begin(), destination.end(), element) != destination.end();
}
template <typename ForwardIterator>
-void deleteAll(ForwardIterator begin, ForwardIterator end)
+inline void deleteAll(ForwardIterator begin, ForwardIterator end)
{
while (begin != end) {
delete *begin;