style: Fix coding guideline violations

This commit is contained in:
Jesse Dao 2026-01-14 22:35:17 +07:00
parent c3c42902a7
commit 046ec81bf0
5 changed files with 9 additions and 14 deletions

View File

@ -25,9 +25,9 @@ PlacementMap::PlacementMap() {
mCol = 0;
mRow = 0;
mNumRoutes = 0;
mP18 = 0;
mMgr = 0;
mPa = 0;
mP18 = nullptr;
mMgr = nullptr;
mPa = nullptr;
mDynamicGroupIdx = 0xFFFFFFFF;
mRes[0].mStatus = HkscRes::Status::_0;
mRes[1].mStatus = HkscRes::Status::_0;

View File

@ -5,9 +5,7 @@ namespace ksys::qst {
CameraTarget::~CameraTarget() = default;
ActorData::ActorData(sead::Heap* heap) {
this->heap = heap;
}
ActorData::ActorData(sead::Heap* heap) : heap(heap) {}
ActorData::~ActorData() {
for (int i = 0; i < targets.size(); ++i) {

View File

@ -3,10 +3,7 @@
namespace ksys::qst {
Indicator::Indicator(Step* step, sead::Heap* heap) {
this->heap = heap;
this->step = step;
}
Indicator::Indicator(Step* step, sead::Heap* heap) : heap(heap), step(step) {}
Indicator::~Indicator() {
finalize();

View File

@ -145,7 +145,7 @@ bool ByamlIter::getByamlDataByKey(ByamlData* data, const char* key) const {
auto* header = reinterpret_cast<const al::ByamlHeader*>(mData);
const s32 offset = header->getHashKeyTableOffset();
if (!offset) {
if (offset == 0) {
return false;
}
const ByamlStringTableIter table = ByamlStringTableIter(&mData[offset]);

View File

@ -23,12 +23,12 @@ void Event::initialize(bool manual_reset) {
}
void Event::wait() {
if (!mSignalSet || !mManualReset)
if (mSignalSet == 0 || !mManualReset)
mEvent.wait();
}
bool Event::wait(sead::TickSpan duration) {
return (mSignalSet && mManualReset) || mEvent.wait(duration);
return (mSignalSet != 0 && mManualReset) || mEvent.wait(duration);
}
void Event::setSignal() {
@ -40,7 +40,7 @@ void Event::setSignal() {
}
void Event::resetSignal() {
if (!mSignalSet && mManualReset)
if (mSignalSet == 0 && mManualReset)
return;
mEvent.resetSignal();