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

summaryrefslogtreecommitdiff
path: root/source/core/StarJson.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/StarJson.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/StarJson.cpp')
-rw-r--r--source/core/StarJson.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/core/StarJson.cpp b/source/core/StarJson.cpp
index 2892e1c..3feaf37 100644
--- a/source/core/StarJson.cpp
+++ b/source/core/StarJson.cpp
@@ -745,7 +745,7 @@ Maybe<JsonObject> Json::optQueryObject(String const& path) const {
Json Json::set(String key, Json value) const {
auto map = toObject();
- map[move(key)] = move(value);
+ map[std::move(key)] = std::move(value);
return map;
}
@@ -760,31 +760,31 @@ Json Json::erasePath(String path) const {
Json Json::setAll(JsonObject values) const {
auto map = toObject();
for (auto& p : values)
- map[move(p.first)] = move(p.second);
+ map[std::move(p.first)] = std::move(p.second);
return map;
}
Json Json::eraseKey(String key) const {
auto map = toObject();
- map.erase(move(key));
+ map.erase(std::move(key));
return map;
}
Json Json::set(size_t index, Json value) const {
auto array = toArray();
- array[index] = move(value);
+ array[index] = std::move(value);
return array;
}
Json Json::insert(size_t index, Json value) const {
auto array = toArray();
- array.insertAt(index, move(value));
+ array.insertAt(index, std::move(value));
return array;
}
Json Json::append(Json value) const {
auto array = toArray();
- array.append(move(value));
+ array.append(std::move(value));
return array;
}
@@ -927,7 +927,7 @@ DataStream& operator>>(DataStream& os, Json& v) {
for (size_t i = 0; i < s; ++i)
l.append(os.read<Json>());
- v = move(l);
+ v = std::move(l);
} else if (type == Json::Type::Object) {
JsonObject m;
size_t s = os.readVlqU();
@@ -936,7 +936,7 @@ DataStream& operator>>(DataStream& os, Json& v) {
m[k] = os.read<Json>();
}
- v = move(m);
+ v = std::move(m);
}
return os;