From ec8bb14e3fd31dfb97b240bc3da5abc0d476eee4 Mon Sep 17 00:00:00 2001 From: Rasmus Anthin Date: Thu, 3 Oct 2024 18:59:35 +0200 Subject: [PATCH] More windows warnings fixes. --- Inventory.h | 2 +- Keyboard.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventory.h b/Inventory.h index cabc0ce..ae2d7b8 100644 --- a/Inventory.h +++ b/Inventory.h @@ -187,7 +187,7 @@ namespace dung InvSubGroup* fetch_subgroup(int subgroup_idx) { - if (math::in_range(subgroup_idx, 0, m_subgroups.size(), Range::ClosedOpen)) + if (math::in_range(subgroup_idx, 0, stlutils::sizeI(m_subgroups), Range::ClosedOpen)) return &m_subgroups[subgroup_idx]; else { diff --git a/Keyboard.h b/Keyboard.h index cbaff4e..b1d041a 100644 --- a/Keyboard.h +++ b/Keyboard.h @@ -357,7 +357,7 @@ namespace dung { if (m_player.has_weight_capacity(key.weight)) { - m_player.key_idcs.emplace_back(key_idx); + m_player.key_idcs.emplace_back(static_cast(key_idx)); key.picked_up = true; message_handler->add_message(static_cast(real_time_s), "You picked up a key!", MessageHandler::Level::Guide);