summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanjie Wu <wu@x-nagi.com>2023-12-16 05:04:01 -0800
committerHanjie Wu <wu@x-nagi.com>2023-12-16 05:04:01 -0800
commitf6dd0cf6ab867dfb0d4473d6fcde773332907f71 (patch)
tree5f2306e4e4e431e40ee90661f4f823b81fd02223
parentd212a3bd8258bb2523280c7b081e4eb9a2194132 (diff)
fix c++11 issue
-rw-r--r--src/libutp/utp_internal.cpp2
-rw-r--r--src/libutp/utp_internal.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libutp/utp_internal.cpp b/src/libutp/utp_internal.cpp
index 90d281a4..8c1b2a86 100644
--- a/src/libutp/utp_internal.cpp
+++ b/src/libutp/utp_internal.cpp
@@ -2895,7 +2895,7 @@ int utp_process_udp(utp_context *ctx, const byte *buffer, size_t len, const stru
if (ctx->last_utp_socket && ctx->last_utp_socket->addr == addr && ctx->last_utp_socket->conn_id_recv == id) {
conn = ctx->last_utp_socket;
- } else if (lookup = ctx->utp_sockets.lookup(UTPSocketKey{ addr, id }); lookup != nullptr) {
+ } else if (lookup = ctx->utp_sockets.lookup(UTPSocketKey{ addr, id }), lookup != nullptr) {
conn = ctx->last_utp_socket = lookup;
}
diff --git a/src/libutp/utp_internal.h b/src/libutp/utp_internal.h
index 33500f98..064ddfa3 100644
--- a/src/libutp/utp_internal.h
+++ b/src/libutp/utp_internal.h
@@ -131,7 +131,7 @@ public:
return map_.count(key) != 0U;
}
- [[nodiscard]] auto size()->bool const {
+ [[nodiscard]] auto size()->size_t const {
return map_.size();
}