From 1e80b07d26daf690cdd842f2e9cb631d11106ab2 Mon Sep 17 00:00:00 2001 From: Ivan Gagis's Bot Date: Mon, 23 Nov 2026 21:26:18 +0200 Subject: [PATCH] assert: compare std::function objects with nullptr explicitly utki::assert() no longer provides std::function-based overloads; call sites asserting a std::function object for non-emptiness must compare with nullptr explicitly. --- src/ruis/context.cpp | 2 +- src/ruis/render/context.cpp | 2 +- src/ruis/updater.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ruis/context.cpp b/src/ruis/context.cpp index 1374d37b9..af1aeaace 100644 --- a/src/ruis/context.cpp +++ b/src/ruis/context.cpp @@ -40,7 +40,7 @@ context::context(parameters params) : void context::post_to_ui_thread(std::function proc) { - utki::assert(this->post_to_ui_thread_function, SL); + utki::assert(this->post_to_ui_thread_function != nullptr, SL); this->post_to_ui_thread_function(std::move(proc)); } diff --git a/src/ruis/render/context.cpp b/src/ruis/render/context.cpp index e93fa617f..77a1857ac 100644 --- a/src/ruis/render/context.cpp +++ b/src/ruis/render/context.cpp @@ -66,7 +66,7 @@ context::~context() void context::apply(std::function func) { - utki::assert(func, SL); + utki::assert(func != nullptr, SL); if (this->is_current()) { // this context is already current diff --git a/src/ruis/updater.hpp b/src/ruis/updater.hpp index 0b6272885..138697d35 100644 --- a/src/ruis/updater.hpp +++ b/src/ruis/updater.hpp @@ -79,7 +79,7 @@ class updater : public std::enable_shared_from_this active_queue(&q1), inactive_queue(&q2) { - utki::assert(this->get_ticks_ms, SL); + utki::assert(this->get_ticks_ms != nullptr, SL); } // returns dt to wait before next update