From 1df9da852c9bf5ddc28e25a6750b0171ebd33d30 Mon Sep 17 00:00:00 2001 From: jeefo Date: Wed, 15 May 2024 10:14:18 +0300 Subject: [PATCH] fix: build on recent gcc14 --- ext/crlib | 2 +- inc/graph.h | 2 +- inc/yapb.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/crlib b/ext/crlib index c722157..9cac79a 160000 --- a/ext/crlib +++ b/ext/crlib @@ -1 +1 @@ -Subproject commit c72215707a9be44eb2582b82a90a4a7f27a9f2e1 +Subproject commit 9cac79adde707f5e5ab21ff74ff372d51659a304 diff --git a/inc/graph.h b/inc/graph.h index 48576f6..182afa4 100644 --- a/inc/graph.h +++ b/inc/graph.h @@ -269,7 +269,7 @@ public: public: int32_t getMaxRouteLength () const { - return length () / 2; + return (length () / 2) + (kMaxNodes / 256); } StringRef getAuthor () const { diff --git a/inc/yapb.h b/inc/yapb.h index 1cb06eb..e27d9c9 100644 --- a/inc/yapb.h +++ b/inc/yapb.h @@ -189,7 +189,8 @@ public: } void init (int32_t length) { - m_path = cr::makeUnique (length); + const auto allocSize = static_cast (length); + m_path = cr::makeUnique (allocSize); } };