Fix extra semicolons and enable -Wextra-semi warning

This commit is contained in:
Léo Lam 2022-06-24 14:45:24 +02:00
parent ac2df65376
commit 5b40c220e5
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
9 changed files with 16 additions and 15 deletions

View File

@ -24,10 +24,11 @@ add_executable(uking)
target_include_directories(uking PRIVATE src) target_include_directories(uking PRIVATE src)
target_compile_definitions(uking PRIVATE NON_MATCHING) target_compile_definitions(uking PRIVATE NON_MATCHING)
target_compile_options(uking PRIVATE -fno-rtti -fno-exceptions) target_compile_options(uking PRIVATE -fno-rtti -fno-exceptions)
target_compile_options(uking PRIVATE -fno-strict-aliasing)
target_compile_options(uking PRIVATE -Wall -Wextra -Wdeprecated) target_compile_options(uking PRIVATE -Wall -Wextra -Wdeprecated)
target_compile_options(uking PRIVATE -Wno-unused-parameter -Wno-unused-private-field) target_compile_options(uking PRIVATE -Wno-unused-parameter -Wno-unused-private-field)
target_compile_options(uking PRIVATE -fno-strict-aliasing)
target_compile_options(uking PRIVATE -Wno-invalid-offsetof) target_compile_options(uking PRIVATE -Wno-invalid-offsetof)
target_compile_options(uking PRIVATE -Wextra-semi)
add_subdirectory(lib/NintendoSDK) add_subdirectory(lib/NintendoSDK)
target_link_libraries(uking PUBLIC NintendoSDK) target_link_libraries(uking PUBLIC NintendoSDK)

View File

@ -8,7 +8,7 @@ class hkpHeightFieldShape : public hkpShape {
public: public:
HK_DECLARE_CLASS_ALLOCATOR(hkpHeightFieldShape) HK_DECLARE_CLASS_ALLOCATOR(hkpHeightFieldShape)
HK_DECLARE_REFLECTION() HK_DECLARE_REFLECTION()
HKCD_DECLARE_SHAPE_TYPE(hkcdShapeType::HEIGHT_FIELD); HKCD_DECLARE_SHAPE_TYPE(hkcdShapeType::HEIGHT_FIELD)
struct CollideSpheresInput { struct CollideSpheresInput {
HK_DECLARE_CLASS_ALLOCATOR(CollideSpheresInput) HK_DECLARE_CLASS_ALLOCATOR(CollideSpheresInput)

@ -1 +1 @@
Subproject commit 88f9a6841aadf1740accb1f7def1bc5d6f347d2b Subproject commit c51a95d08254765a9a4a9a799bb74be46fd51499

View File

@ -22,8 +22,8 @@ public:
SEAD_ENUM(HardModeChange, IsLastPlayHardMode = 0, NerfHpRestore = 1, _2 = 2, SEAD_ENUM(HardModeChange, IsLastPlayHardMode = 0, NerfHpRestore = 1, _2 = 2,
DisableNoDeathDamage = 3, PatchGanonStunLock = 4, EnableLifeRegen = 5, DisableNoDeathDamage = 3, PatchGanonStunLock = 4, EnableLifeRegen = 5,
RandomizeGuardianChargeBeam = 6, ApplyDamageMultiplier = 7, RandomizeGuardianChargeBeam = 6, ApplyDamageMultiplier = 7,
EnableShorterEnemyNotice = 8); EnableShorterEnemyNotice = 8)
SEAD_ENUM(Flag, EnableHardMode = 0); SEAD_ENUM(Flag, EnableHardMode = 0)
SEAD_ENUM(MultiplierType, HpRestore = 0, _1 = 1, EnemyNoticeDuration = 2) SEAD_ENUM(MultiplierType, HpRestore = 0, _1 = 1, EnemyNoticeDuration = 2)
void init(sead::Heap* heap); void init(sead::Heap* heap);

View File

@ -12,7 +12,7 @@ namespace uking::dmg {
// FIXME: incomplete // FIXME: incomplete
class DamageInfoMgr { class DamageInfoMgr {
SEAD_SINGLETON_DISPOSER(DamageInfoMgr); SEAD_SINGLETON_DISPOSER(DamageInfoMgr)
DamageInfoMgr(); DamageInfoMgr();
virtual ~DamageInfoMgr(); virtual ~DamageInfoMgr();

View File

@ -18,7 +18,7 @@ class Struct20Base {
SEAD_RTTI_BASE(Struct20Base) SEAD_RTTI_BASE(Struct20Base)
public: public:
virtual ~Struct20Base(){}; virtual ~Struct20Base() = default;
virtual void reset(); virtual void reset();
virtual void combineMaybe(Struct20Base* other); virtual void combineMaybe(Struct20Base* other);

View File

@ -14,7 +14,7 @@ enum class AudioChannelType {
// FIXME: incomplete // FIXME: incomplete
struct SoundMgr { struct SoundMgr {
SEAD_SINGLETON_DISPOSER(SoundMgr); SEAD_SINGLETON_DISPOSER(SoundMgr)
virtual ~SoundMgr(); virtual ~SoundMgr();

View File

@ -7,7 +7,7 @@
namespace ksys { namespace ksys {
class SystemTimers { class SystemTimers {
SEAD_SINGLETON_DISPOSER(SystemTimers); SEAD_SINGLETON_DISPOSER(SystemTimers)
SystemTimers() = default; SystemTimers() = default;
virtual ~SystemTimers(); virtual ~SystemTimers();

View File

@ -169,10 +169,10 @@ private:
struct ByamlHeader { struct ByamlHeader {
u16 getTag() const; u16 getTag() const;
bool isInvertHeader() const; bool isInvertHeader() const;
u16 getVersion() const { return version; }; u16 getVersion() const { return version; }
u32 getHashKeyTableOffset() const { return hash_key_table_offset; }; u32 getHashKeyTableOffset() const { return hash_key_table_offset; }
u32 getStringTableOffset() const { return string_table_offset; }; u32 getStringTableOffset() const { return string_table_offset; }
u32 getDataOffset() const { return data_offset; }; u32 getDataOffset() const { return data_offset; }
u16 magic; u16 magic;
u16 version; u16 version;
@ -188,7 +188,7 @@ struct ByamlContainerHeader {
return ByamlType(*reinterpret_cast<const u8*>(&type_and_size)); return ByamlType(*reinterpret_cast<const u8*>(&type_and_size));
} }
u32 getCount() const { return type_and_size >> 8; }; u32 getCount() const { return type_and_size >> 8; }
u32 type_and_size; u32 type_and_size;
}; };