fixing issue with static casts

This commit is contained in:
2023-12-22 00:45:06 +01:00
parent ca13d77996
commit 74b30ea218
2 changed files with 4 additions and 4 deletions

View File

@@ -15,12 +15,12 @@
#define CHECK_WINDOW_PTR(win) \
if(win == nullptr) \
{ \
core::error::report(e_kind::error, "invalid window ptr (NULL) passed to '%s'", MLX_FUNC_SIG); \
core::error::report(e_kind::error, "invalid window ptr (NULL)"); \
return; \
} \
else if(*static_cast<int*>(win) < 0 || *static_cast<std::size_t*>(win) > _graphics.size())\
else if(*static_cast<int*>(win) < 0 || *static_cast<int*>(win) > static_cast<int>(_graphics.size()))\
{ \
core::error::report(e_kind::error, "invalid window ptr passed to '%s'", MLX_FUNC_SIG); \
core::error::report(e_kind::error, "invalid window ptr"); \
return; \
} else {}\

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 17:35:20 by maldavid #+# #+# */
/* Updated: 2023/12/16 20:20:41 by maldavid ### ########.fr */
/* Updated: 2023/12/21 15:50:47 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */