diff options
author | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-19 16:55:19 +0100 |
---|---|---|
committer | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-19 16:55:19 +0100 |
commit | 431a9c00a56cf4c603be1cf5f773b193621d8150 (patch) | |
tree | 95843aeea9fb6dc18279ee05ff6961f40b19798f /source/core/StarFlatHashMap.hpp | |
parent | 30e1871d3f44629e00a1f66d8164e3e62c7f889f (diff) |
Fixed a huge amount of Clang warnings
On Linux and macOS, using Clang to compile OpenStarbound produces about 400 MB worth of warnings during the build, making the compiler output unreadable and slowing the build down considerably.
99% of the warnings were unqualified uses of std::move and std::forward, which are now all properly qualified.
Fixed a few other minor warnings about non-virtual destructors and some uses of std::move preventing copy elision on temporary objects.
Most remaining warnings are now unused parameters.
Diffstat (limited to 'source/core/StarFlatHashMap.hpp')
-rw-r--r-- | source/core/StarFlatHashMap.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/core/StarFlatHashMap.hpp b/source/core/StarFlatHashMap.hpp index 6a8c739..111aa6b 100644 --- a/source/core/StarFlatHashMap.hpp +++ b/source/core/StarFlatHashMap.hpp @@ -290,12 +290,12 @@ FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::FlatHashMap(FlatHashMap const template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::FlatHashMap(FlatHashMap&& other) - : FlatHashMap(move(other), other.m_table.getAllocator()) {} + : FlatHashMap(std::move(other), other.m_table.getAllocator()) {} template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::FlatHashMap(FlatHashMap&& other, allocator_type const& alloc) : FlatHashMap(alloc) { - operator=(move(other)); + operator=(std::move(other)); } template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> @@ -326,7 +326,7 @@ auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::operator=(FlatHashMap co template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::operator=(FlatHashMap&& other) -> FlatHashMap& { - m_table = move(other.m_table); + m_table = std::move(other.m_table); return *this; } @@ -391,7 +391,7 @@ auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::insert(value_type const& template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> template <typename T, typename> auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::insert(T&& value) -> pair<iterator, bool> { - auto res = m_table.insert(TableValue(forward<T&&>(value))); + auto res = m_table.insert(TableValue(std::forward<T&&>(value))); return {iterator{res.first}, res.second}; } @@ -403,7 +403,7 @@ auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::insert(const_iterator hi template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> template <typename T, typename> auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::insert(const_iterator, T&& value) -> iterator { - return insert(forward<T&&>(value)).first; + return insert(std::forward<T&&>(value)).first; } template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> @@ -422,13 +422,13 @@ void FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::insert(initializer_list< template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> template <typename... Args> auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::emplace(Args&&... args) -> pair<iterator, bool> { - return insert(TableValue(forward<Args>(args)...)); + return insert(TableValue(std::forward<Args>(args)...)); } template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> template <typename... Args> auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::emplace_hint(const_iterator hint, Args&&... args) -> iterator { - return insert(hint, TableValue(forward<Args>(args)...)); + return insert(hint, TableValue(std::forward<Args>(args)...)); } template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> @@ -480,7 +480,7 @@ auto FlatHashMap<Key, Mapped, Hash, Equals, Allocator>::operator[](key_type&& ke auto i = m_table.find(key); if (i != m_table.end()) return i->second; - return m_table.insert({move(key), mapped_type()}).first->second; + return m_table.insert({std::move(key), mapped_type()}).first->second; } template <typename Key, typename Mapped, typename Hash, typename Equals, typename Allocator> |