forked from ShuriZma/suyu
Merge pull request #10022 from liamwhite/gcc-13
general: fixes for gcc 13
This commit is contained in:
commit
25c4ae6e11
|
@ -126,6 +126,17 @@ else()
|
||||||
add_compile_options("-stdlib=libc++")
|
add_compile_options("-stdlib=libc++")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# GCC bugs
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
# These diagnostics would be great if they worked, but are just completely broken
|
||||||
|
# and produce bogus errors on external libraries like fmt.
|
||||||
|
add_compile_options(
|
||||||
|
-Wno-array-bounds
|
||||||
|
-Wno-stringop-overread
|
||||||
|
-Wno-stringop-overflow
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set file offset size to 64 bits.
|
# Set file offset size to 64 bits.
|
||||||
#
|
#
|
||||||
# On modern Unixes, this is typically already the case. The lone exception is
|
# On modern Unixes, this is typically already the case. The lone exception is
|
||||||
|
|
|
@ -96,10 +96,6 @@ public:
|
||||||
return m_node == rhs.m_node;
|
return m_node == rhs.m_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr bool operator!=(const Iterator& rhs) const {
|
|
||||||
return !(*this == rhs);
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr pointer operator->() const {
|
constexpr pointer operator->() const {
|
||||||
return m_node;
|
return m_node;
|
||||||
}
|
}
|
||||||
|
@ -324,10 +320,6 @@ public:
|
||||||
return m_impl == rhs.m_impl;
|
return m_impl == rhs.m_impl;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr bool operator!=(const Iterator& rhs) const {
|
|
||||||
return !(*this == rhs);
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr pointer operator->() const {
|
constexpr pointer operator->() const {
|
||||||
return Traits::GetParent(std::addressof(*m_impl));
|
return Traits::GetParent(std::addressof(*m_impl));
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,6 @@ public:
|
||||||
|
|
||||||
// Comparison operators.
|
// Comparison operators.
|
||||||
constexpr bool operator==(const TypedAddress&) const = default;
|
constexpr bool operator==(const TypedAddress&) const = default;
|
||||||
constexpr bool operator!=(const TypedAddress&) const = default;
|
|
||||||
constexpr auto operator<=>(const TypedAddress&) const = default;
|
constexpr auto operator<=>(const TypedAddress&) const = default;
|
||||||
|
|
||||||
// For convenience, also define comparison operators versus uint64_t.
|
// For convenience, also define comparison operators versus uint64_t.
|
||||||
|
@ -124,10 +123,6 @@ public:
|
||||||
return m_address == rhs;
|
return m_address == rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr inline bool operator!=(uint64_t rhs) const {
|
|
||||||
return m_address != rhs;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allow getting the address explicitly, for use in accessors.
|
// Allow getting the address explicitly, for use in accessors.
|
||||||
constexpr inline uint64_t GetValue() const {
|
constexpr inline uint64_t GetValue() const {
|
||||||
return m_address;
|
return m_address;
|
||||||
|
|
|
@ -16,9 +16,6 @@ namespace Network {
|
||||||
|
|
||||||
class ProxySocket : public SocketBase {
|
class ProxySocket : public SocketBase {
|
||||||
public:
|
public:
|
||||||
YUZU_NON_COPYABLE(ProxySocket);
|
|
||||||
YUZU_NON_MOVEABLE(ProxySocket);
|
|
||||||
|
|
||||||
explicit ProxySocket(RoomNetwork& room_network_) noexcept;
|
explicit ProxySocket(RoomNetwork& room_network_) noexcept;
|
||||||
~ProxySocket() override;
|
~ProxySocket() override;
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,10 @@ public:
|
||||||
|
|
||||||
SocketBase() = default;
|
SocketBase() = default;
|
||||||
explicit SocketBase(SOCKET fd_) : fd{fd_} {}
|
explicit SocketBase(SOCKET fd_) : fd{fd_} {}
|
||||||
|
|
||||||
virtual ~SocketBase() = default;
|
virtual ~SocketBase() = default;
|
||||||
|
|
||||||
virtual SocketBase& operator=(const SocketBase&) = delete;
|
YUZU_NON_COPYABLE(SocketBase);
|
||||||
|
YUZU_NON_MOVEABLE(SocketBase);
|
||||||
// Avoid closing sockets implicitly
|
|
||||||
virtual SocketBase& operator=(SocketBase&&) noexcept = delete;
|
|
||||||
|
|
||||||
virtual Errno Initialize(Domain domain, Type type, Protocol protocol) = 0;
|
virtual Errno Initialize(Domain domain, Type type, Protocol protocol) = 0;
|
||||||
|
|
||||||
|
@ -109,14 +106,8 @@ public:
|
||||||
|
|
||||||
~Socket() override;
|
~Socket() override;
|
||||||
|
|
||||||
Socket(const Socket&) = delete;
|
|
||||||
Socket& operator=(const Socket&) = delete;
|
|
||||||
|
|
||||||
Socket(Socket&& rhs) noexcept;
|
Socket(Socket&& rhs) noexcept;
|
||||||
|
|
||||||
// Avoid closing sockets implicitly
|
|
||||||
Socket& operator=(Socket&&) noexcept = delete;
|
|
||||||
|
|
||||||
Errno Initialize(Domain domain, Type type, Protocol protocol) override;
|
Errno Initialize(Domain domain, Type type, Protocol protocol) override;
|
||||||
|
|
||||||
Errno Close() override;
|
Errno Close() override;
|
||||||
|
|
|
@ -21,7 +21,7 @@ bool VerifyLogin(const std::string& host, const std::string& username, const std
|
||||||
return username.empty();
|
return username.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
return username == *iter;
|
return *iter == username;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace WebService
|
} // namespace WebService
|
||||||
|
|
Loading…
Reference in New Issue