From 403dbc7791a71c1a8b3bd387d947cffc5f7c96df Mon Sep 17 00:00:00 2001 From: ShiftyX1 Date: Mon, 8 Dec 2025 19:58:00 +0300 Subject: [PATCH] =?UTF-8?q?fixed=20error:=20could=20not=20convert=20from?= =?UTF-8?q?=20=E2=80=98void=E2=80=99=20to=20=E2=80=98bool=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/ObjectsPool.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/ObjectsPool.hpp b/src/util/ObjectsPool.hpp index 0e330cfb..d3116f92 100644 --- a/src/util/ObjectsPool.hpp +++ b/src/util/ObjectsPool.hpp @@ -35,7 +35,9 @@ namespace util { std::shared_ptr create(Args&&... args) { std::lock_guard lock(mutex); if (freeObjects.empty()) { - if (!allocateNew()) { + try { + allocateNew(); + } catch (const std::bad_alloc&) { return std::make_shared(std::forward(args)...); } }