Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarDirectives.cpp
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
committerKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
commit431a9c00a56cf4c603be1cf5f773b193621d8150 (patch)
tree95843aeea9fb6dc18279ee05ff6961f40b19798f /source/core/StarDirectives.cpp
parent30e1871d3f44629e00a1f66d8164e3e62c7f889f (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/StarDirectives.cpp')
-rw-r--r--source/core/StarDirectives.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp
index 6c335a5..5d5266f 100644
--- a/source/core/StarDirectives.cpp
+++ b/source/core/StarDirectives.cpp
@@ -7,7 +7,7 @@
namespace Star {
Directives::Entry::Entry(ImageOperation&& newOperation, size_t strBegin, size_t strLength) {
- operation = move(newOperation);
+ operation = std::move(newOperation);
begin = strBegin;
length = strLength;
}
@@ -43,8 +43,8 @@ bool Directives::Shared::empty() const {
}
Directives::Shared::Shared(List<Entry>&& givenEntries, String&& givenString, StringView givenPrefix) {
- entries = move(givenEntries);
- string = move(givenString);
+ entries = std::move(givenEntries);
+ string = std::move(givenString);
prefix = givenPrefix;
hash = XXH3_64bits(string.utf8Ptr(), string.utf8Size());
}
@@ -56,7 +56,7 @@ Directives::Directives(String const& directives) {
}
Directives::Directives(String&& directives) {
- parse(move(directives));
+ parse(std::move(directives));
}
Directives::Directives(const char* directives) {
@@ -64,7 +64,7 @@ Directives::Directives(const char* directives) {
}
Directives::Directives(Directives&& directives) {
- *this = move(directives);
+ *this = std::move(directives);
}
Directives::Directives(Directives const& directives) {
@@ -87,7 +87,7 @@ Directives& Directives::operator=(String&& s) {
return *this;
}
- parse(move(s));
+ parse(std::move(s));
return *this;
}
@@ -100,7 +100,7 @@ Directives& Directives::operator=(const char* s) {
}
Directives& Directives::operator=(Directives&& other) {
- shared = move(other.shared);
+ shared = std::move(other.shared);
return *this;
}
@@ -132,7 +132,7 @@ void Directives::parse(String&& directives) {
if (beg == 0) {
try {
ImageOperation operation = imageOperationFromString(split);
- newList.emplace_back(move(operation), beg, end);
+ newList.emplace_back(std::move(operation), beg, end);
}
catch (StarException const& e) {
prefix = split;
@@ -141,7 +141,7 @@ void Directives::parse(String&& directives) {
}
else {
ImageOperation operation = NullImageOperation();
- newList.emplace_back(move(operation), beg, end);
+ newList.emplace_back(std::move(operation), beg, end);
}
}
});
@@ -151,7 +151,7 @@ void Directives::parse(String&& directives) {
return;
}
- shared = std::make_shared<Shared const>(move(newList), move(directives), prefix);
+ shared = std::make_shared<Shared const>(std::move(newList), std::move(directives), prefix);
if (view.size() < 1000) { // Pre-load short enough directives
for (auto& entry : shared->entries)
entry.loadOperation(*shared);
@@ -219,7 +219,7 @@ DataStream& operator>>(DataStream& ds, Directives& directives) {
String string;
ds.read(string);
- directives.parse(move(string));
+ directives.parse(std::move(string));
return ds;
}
@@ -240,7 +240,7 @@ DirectivesGroup::DirectivesGroup(String const& directives) : m_count(0) {
Directives parsed(directives);
if (parsed) {
- m_directives.emplace_back(move(parsed));
+ m_directives.emplace_back(std::move(parsed));
m_count = m_directives.back().size();
}
}
@@ -250,9 +250,9 @@ DirectivesGroup::DirectivesGroup(String&& directives) : m_count(0) {
return;
}
- Directives parsed(move(directives));
+ Directives parsed(std::move(directives));
if (parsed) {
- m_directives.emplace_back(move(parsed));
+ m_directives.emplace_back(std::move(parsed));
m_count = m_directives.back().size();
}
}
@@ -372,7 +372,7 @@ DataStream& operator>>(DataStream& ds, DirectivesGroup& directivesGroup) {
String string;
ds.read(string);
- directivesGroup = DirectivesGroup(move(string));
+ directivesGroup = DirectivesGroup(std::move(string));
return ds;
}