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/StarBTreeDatabase.cpp | |
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/StarBTreeDatabase.cpp')
-rw-r--r-- | source/core/StarBTreeDatabase.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/core/StarBTreeDatabase.cpp b/source/core/StarBTreeDatabase.cpp index 4ac321f..b188f20 100644 --- a/source/core/StarBTreeDatabase.cpp +++ b/source/core/StarBTreeDatabase.cpp @@ -58,7 +58,7 @@ String BTreeDatabase::contentIdentifier() const { void BTreeDatabase::setContentIdentifier(String contentIdentifier) { WriteLocker writeLocker(m_lock); checkIfOpen("setContentIdentifier", false); - m_contentIdentifier = move(contentIdentifier); + m_contentIdentifier = std::move(contentIdentifier); } uint32_t BTreeDatabase::indexCacheSize() const { @@ -91,7 +91,7 @@ IODevicePtr BTreeDatabase::ioDevice() const { void BTreeDatabase::setIODevice(IODevicePtr device) { WriteLocker writeLocker(m_lock); checkIfOpen("setIODevice", false); - m_device = move(device); + m_device = std::move(device); } bool BTreeDatabase::isOpen() const { @@ -188,12 +188,12 @@ void BTreeDatabase::forEach(ByteArray const& lower, ByteArray const& upper, func ReadLocker readLocker(m_lock); checkKeySize(lower); checkKeySize(upper); - m_impl.forEach(lower, upper, move(v)); + m_impl.forEach(lower, upper, std::move(v)); } void BTreeDatabase::forAll(function<void(ByteArray, ByteArray)> v) { ReadLocker readLocker(m_lock); - m_impl.forAll(move(v)); + m_impl.forAll(std::move(v)); } bool BTreeDatabase::insert(ByteArray const& k, ByteArray const& data) { @@ -445,7 +445,7 @@ ByteArray const& BTreeDatabase::LeafNode::data(size_t i) const { } void BTreeDatabase::LeafNode::insert(size_t i, ByteArray k, ByteArray d) { - elements.insertAt(i, Element{move(k), move(d)}); + elements.insertAt(i, Element{std::move(k), std::move(d)}); } void BTreeDatabase::LeafNode::remove(size_t i) { @@ -855,7 +855,7 @@ auto BTreeDatabase::BTreeImpl::leafData(Leaf const& leaf, size_t i) -> Data { } void BTreeDatabase::BTreeImpl::leafInsert(Leaf& leaf, size_t i, Key k, Data d) { - leaf->insert(i, move(k), move(d)); + leaf->insert(i, std::move(k), std::move(d)); } void BTreeDatabase::BTreeImpl::leafRemove(Leaf& leaf, size_t i) { |