Further work on replacing integer definitions, make missing sanitizer only a warning instead of an error
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
46bf10c719
commit
beb2e44a0b
|
@ -7,14 +7,12 @@ export BattleRandom* CreatureLib_BattleRandom_ConstructWithSeed(uint_fast32_t se
|
||||||
|
|
||||||
export void CreatureLib_BattleRandom_Destruct(BattleRandom* p) { delete p; }
|
export void CreatureLib_BattleRandom_Destruct(BattleRandom* p) { delete p; }
|
||||||
|
|
||||||
export uint8_t CreatureLib_BattleRandom_EffectChance(bool& out, BattleRandom* p, float chance, ExecutingAttack* attack,
|
export i8 CreatureLib_BattleRandom_EffectChance(bool& out, BattleRandom* p, float chance, ExecutingAttack* attack,
|
||||||
Creature* target) {
|
Creature* target) {
|
||||||
Try(out = p->EffectChance(chance, attack, target);)
|
Try(out = p->EffectChance(chance, attack, target);)
|
||||||
}
|
}
|
||||||
|
|
||||||
export int32_t CreatureLib_BattleRandom_Get(BattleRandom* p) { return p->Get(); }
|
export i32 CreatureLib_BattleRandom_Get(BattleRandom* p) { return p->Get(); }
|
||||||
export int32_t CreatureLib_BattleRandom_GetMax(BattleRandom* p, int32_t max) { return p->Get(max); }
|
export i32 CreatureLib_BattleRandom_GetMax(BattleRandom* p, i32 max) { return p->Get(max); }
|
||||||
export int32_t CreatureLib_BattleRandom_GetMinMax(BattleRandom* p, int32_t min, int32_t max) {
|
export i32 CreatureLib_BattleRandom_GetMinMax(BattleRandom* p, i32 min, i32 max) { return p->Get(min, max); }
|
||||||
return p->Get(min, max);
|
|
||||||
}
|
|
||||||
export uint_fast32_t CreatureLib_BattleRandom_GetSeed(BattleRandom* p) { return p->GetSeed(); }
|
export uint_fast32_t CreatureLib_BattleRandom_GetSeed(BattleRandom* p) { return p->GetSeed(); }
|
||||||
|
|
|
@ -6,12 +6,11 @@ export const BattleStatCalculator* CreatureLib_BattleStatCalculator_Construct()
|
||||||
|
|
||||||
export void CreatureLib_BattleStatCalculator_Destruct(const BattleStatCalculator* p) { delete p; }
|
export void CreatureLib_BattleStatCalculator_Destruct(const BattleStatCalculator* p) { delete p; }
|
||||||
|
|
||||||
export uint8_t CreatureLib_BattleStatCalculator_CalculateFlatStat(uint32_t& out, const BattleStatCalculator* p,
|
export u8 CreatureLib_BattleStatCalculator_CalculateFlatStat(u32& out, const BattleStatCalculator* p,
|
||||||
Creature* creature,
|
Creature* creature, CreatureLib::Library::Statistic stat) {
|
||||||
CreatureLib::Library::Statistic stat) {
|
|
||||||
Try(out = p->CalculateFlatStat(creature, stat);)
|
Try(out = p->CalculateFlatStat(creature, stat);)
|
||||||
}
|
}
|
||||||
export uint8_t CreatureLib_BattleStatCalculator_CalculateBoostedStat(uint32_t& out, const BattleStatCalculator* p,
|
export u8 CreatureLib_BattleStatCalculator_CalculateBoostedStat(u32& out, const BattleStatCalculator* p,
|
||||||
Creature* creature,
|
Creature* creature,
|
||||||
CreatureLib::Library::Statistic stat) {
|
CreatureLib::Library::Statistic stat) {
|
||||||
Try(out = p->CalculateBoostedStat(creature, stat);)
|
Try(out = p->CalculateBoostedStat(creature, stat);)
|
||||||
|
|
|
@ -6,7 +6,7 @@ export const ExperienceLibrary* CreatureLib_ExperienceLibrary_Construct() { retu
|
||||||
|
|
||||||
export void CreatureLib_ExperienceLibrary_Destruct(const ExperienceLibrary* p) { delete p; }
|
export void CreatureLib_ExperienceLibrary_Destruct(const ExperienceLibrary* p) { delete p; }
|
||||||
|
|
||||||
export uint8_t CreatureLib_ExperienceLibrary_HandleExperienceGain(const ExperienceLibrary* p, Creature* faintedMon,
|
export u8 CreatureLib_ExperienceLibrary_HandleExperienceGain(const ExperienceLibrary* p, Creature* faintedMon,
|
||||||
Creature* opponents[], size_t opponentsCount) {
|
Creature* opponents[], size_t opponentsCount) {
|
||||||
Try(auto set = std::unordered_set<ArbUt::BorrowedPtr<Creature>>(opponentsCount);
|
Try(auto set = std::unordered_set<ArbUt::BorrowedPtr<Creature>>(opponentsCount);
|
||||||
for (size_t i = 0; i < opponentsCount;
|
for (size_t i = 0; i < opponentsCount;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "../src/Defines.hpp"
|
||||||
#define export extern "C" [[maybe_unused]]
|
#define export extern "C" [[maybe_unused]]
|
||||||
|
|
||||||
#define CreatureLibException 2;
|
#define CreatureLibException 2;
|
||||||
|
|
|
@ -53,6 +53,8 @@ endif (SHARED)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
add_link_options(-fuse-ld=lld)
|
add_link_options(-fuse-ld=lld)
|
||||||
|
# Only warn for unknown sanitizers. This error is not major enough to error on.
|
||||||
|
add_compile_options(-Wno-error=unknown-sanitizers)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (LEVEL_SIZE STREQUAL "8")
|
if (LEVEL_SIZE STREQUAL "8")
|
||||||
|
|
Loading…
Reference in New Issue