From cfec435de3d891abcada16322a8eb0136c9b96f1 Mon Sep 17 00:00:00 2001 From: Luis Michaelis Date: Sun, 14 Jan 2024 16:17:38 +0100 Subject: [PATCH] fix(build): clang build --- include/zenkit-capi/vobs/Trigger.h | 4 ++-- src/vobs/Misc.cc | 8 ++++---- src/vobs/MovableObject.cc | 2 +- src/vobs/Trigger.cc | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/zenkit-capi/vobs/Trigger.h b/include/zenkit-capi/vobs/Trigger.h index fc1fc21..d5a17cf 100644 --- a/include/zenkit-capi/vobs/Trigger.h +++ b/include/zenkit-capi/vobs/Trigger.h @@ -91,12 +91,12 @@ ZKC_API void ZkTrigger_setDamageThreshold(ZkTrigger* slf, float damageThreshold) ZKC_API float ZkTrigger_getFireDelaySeconds(ZkTrigger const* slf); ZKC_API void ZkTrigger_setFireDelaySeconds(ZkTrigger* slf, float fireDelaySeconds); -ZKC_API ZkBool ZkTrigger_getNextTimeTriggerable(ZkTrigger const* slf); +ZKC_API float ZkTrigger_getNextTimeTriggerable(ZkTrigger const* slf); ZKC_API ZkVirtualObject* ZkTrigger_getOtherVob(ZkTrigger const* slf); ZKC_API int ZkTrigger_getCountCanBeActivated(ZkTrigger const* slf); ZKC_API ZkBool ZkTrigger_getIsEnabled(ZkTrigger const* slf); -ZKC_API void ZkTrigger_setNextTimeTriggerable(ZkTrigger* slf, ZkBool nextTimeTriggerable); +ZKC_API void ZkTrigger_setNextTimeTriggerable(ZkTrigger* slf, float nextTimeTriggerable); ZKC_API void ZkTrigger_setOtherVob(ZkTrigger* slf, ZkVirtualObject* otherVob); ZKC_API void ZkTrigger_setCountCanBeActivated(ZkTrigger* slf, int countCanBeActivated); ZKC_API void ZkTrigger_setIsEnabled(ZkTrigger* slf, ZkBool isEnabled); diff --git a/src/vobs/Misc.cc b/src/vobs/Misc.cc index 6ed8475..dad370d 100644 --- a/src/vobs/Misc.cc +++ b/src/vobs/Misc.cc @@ -1110,7 +1110,7 @@ void ZkNpc_removeOverlay(ZkNpc* slf, ZkSize i) { ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(SLF->overlays, i); - SLF->overlays.erase(SLF->overlays.begin() + i); + SLF->overlays.erase(SLF->overlays.begin() + static_cast(i)); } void ZkNpc_setOverlay(ZkNpc* slf, ZkSize i, ZkString overlay) { @@ -1149,7 +1149,7 @@ void ZkNpc_removeTalent(ZkNpc* slf, ZkSize i) { ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(SLF->talents, i); - SLF->talents.erase(SLF->talents.begin() + i); + SLF->talents.erase(SLF->talents.begin() + static_cast(i)); } void ZkNpc_setTalent(ZkNpc* slf, ZkSize i, ZkNpcTalent* talent) { @@ -1188,7 +1188,7 @@ void ZkNpc_removeItem(ZkNpc* slf, ZkSize i) { ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(SLF->items, i); - SLF->items.erase(SLF->items.begin() + i); + SLF->items.erase(SLF->items.begin() + static_cast(i)); } void ZkNpc_setItem(ZkNpc* slf, ZkSize i, ZkItem* item) { @@ -1227,7 +1227,7 @@ void ZkNpc_removeSlot(ZkNpc* slf, ZkSize i) { ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(SLF->slots, i); - SLF->slots.erase(SLF->slots.begin() + i); + SLF->slots.erase(SLF->slots.begin() + static_cast(i)); } ZkNpcSlot* ZkNpc_addSlot(ZkNpc* slf) { diff --git a/src/vobs/MovableObject.cc b/src/vobs/MovableObject.cc index f0e22fc..8ddbd4c 100644 --- a/src/vobs/MovableObject.cc +++ b/src/vobs/MovableObject.cc @@ -319,7 +319,7 @@ void ZkContainer_removeItem(ZkContainer const* slf, ZkSize i) { ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); ZKC_CHECK_LENV(SLF->s_items, i); - SLF->s_items.erase(SLF->s_items.begin() + i); + SLF->s_items.erase(SLF->s_items.begin() + static_cast(i)); } ZKC_VOB_LOADER(ZkDoor) diff --git a/src/vobs/Trigger.cc b/src/vobs/Trigger.cc index cbb6463..0b05cdb 100644 --- a/src/vobs/Trigger.cc +++ b/src/vobs/Trigger.cc @@ -175,7 +175,7 @@ void ZkTrigger_setFireDelaySeconds(ZkTrigger* slf, float fireDelaySeconds) { SLF->fire_delay_sec = fireDelaySeconds; } -ZkBool ZkTrigger_getNextTimeTriggerable(ZkTrigger const* slf) { +float ZkTrigger_getNextTimeTriggerable(ZkTrigger const* slf) { ZKC_TRACE_FN(); ZKC_CHECK_NULL(slf); return SLF->s_next_time_triggerable; @@ -199,7 +199,7 @@ ZkBool ZkTrigger_getIsEnabled(ZkTrigger const* slf) { return SLF->s_is_enabled; } -void ZkTrigger_setNextTimeTriggerable(ZkTrigger* slf, ZkBool nextTimeTriggerable) { +void ZkTrigger_setNextTimeTriggerable(ZkTrigger* slf, float nextTimeTriggerable) { ZKC_TRACE_FN(); ZKC_CHECK_NULLV(slf); SLF->s_next_time_triggerable = nextTimeTriggerable;