fix Clang warnings
those two tryLexicalCasts were literally just broken
This commit is contained in:
parent
4903d39eed
commit
7b2ce5155a
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -90,6 +90,9 @@ jobs:
|
|||||||
build_linux:
|
build_linux:
|
||||||
name: Build OpenStarbound Linux x86_64
|
name: Build OpenStarbound Linux x86_64
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
env:
|
||||||
|
CC: clang
|
||||||
|
CXX: clang++
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
|
@ -24,12 +24,12 @@ bool tryLexicalCast(bool& result, const char* first, const char* last);
|
|||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
bool tryLexicalCast(Type& result, String const& s) {
|
bool tryLexicalCast(Type& result, String const& s) {
|
||||||
return tryLexicalCast<Type>(s.utf8Ptr(), s.utf8Ptr() + s.utf8Size());
|
return tryLexicalCast<Type>(result, s.utf8Ptr(), s.utf8Ptr() + s.utf8Size());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
bool tryLexicalCast(Type& result, StringView s) {
|
bool tryLexicalCast(Type& result, StringView s) {
|
||||||
return tryLexicalCast<Type>(s.utf8Ptr(), s.utf8Ptr() + s.utf8Size());
|
return tryLexicalCast<Type>(result, s.utf8Ptr(), s.utf8Ptr() + s.utf8Size());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
|
@ -165,7 +165,7 @@ bool NetElementFloating<T>::writeNetDelta(DataStream& ds, uint64_t fromVersion,
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void NetElementFloating<T>::readNetDelta(DataStream& ds, float interpolationTime, NetCompatibilityRules rules) {
|
void NetElementFloating<T>::readNetDelta(DataStream& ds, float interpolationTime, NetCompatibilityRules _rules) {
|
||||||
T t = readValue(ds);
|
T t = readValue(ds);
|
||||||
|
|
||||||
m_latestUpdateVersion = m_netVersion ? m_netVersion->current() : 0;
|
m_latestUpdateVersion = m_netVersion ? m_netVersion->current() : 0;
|
||||||
|
@ -85,11 +85,11 @@ EnumMap<NetCompressionMode> const NetCompressionModeNames {
|
|||||||
|
|
||||||
Packet::~Packet() {}
|
Packet::~Packet() {}
|
||||||
|
|
||||||
void Packet::read(DataStream& ds, NetCompatibilityRules netRules) { read(ds); }
|
void Packet::read(DataStream& ds, NetCompatibilityRules _netRules) { read(ds); }
|
||||||
void Packet::read(DataStream& ds) {}
|
void Packet::read(DataStream& _ds) {}
|
||||||
void Packet::write(DataStream& ds, NetCompatibilityRules netRules) const { write(ds); }
|
void Packet::write(DataStream& ds, NetCompatibilityRules _netRules) const { write(ds); }
|
||||||
void Packet::write(DataStream& ds) const {}
|
void Packet::write(DataStream& _ds) const {}
|
||||||
void Packet::readJson(Json const& json) {}
|
void Packet::readJson(Json const& _json) {}
|
||||||
Json Packet::writeJson() const { return JsonObject{}; }
|
Json Packet::writeJson() const { return JsonObject{}; }
|
||||||
|
|
||||||
PacketCompressionMode Packet::compressionMode() const { return m_compressionMode; }
|
PacketCompressionMode Packet::compressionMode() const { return m_compressionMode; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user