Skip to content

Commit

Permalink
Remove ; after namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterDruide1 committed Oct 15, 2023
1 parent ebebb76 commit 2e10543
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/al/include/Library/HitSensor/HitSensorKeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class HitSensorKeeper {
s32 mSensorCount;
HitSensor** mSensors;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/HostIO/HioNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class HioNode : public IUseHioNode {
public:
// ??
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/HostIO/IUseName.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ class IUseName {
public:
virtual const char* getName() const = 0;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/LiveActor/LiveActorGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ class DeriveActorGroup : LiveActorGroup {
void makeActorAliveAll() { LiveActorGroup::makeActorAliveAll(); }
void makeActorDeadAll() { LiveActorGroup::makeActorDeadAll(); }
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/Nerve/IUseNerve.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ class IUseNerve {

virtual NerveKeeper* getNerveKeeper() const = 0;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/Nerve/NerveExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ class NerveExecutor : public IUseNerve, public HioNode {
private:
NerveKeeper* mKeeper = nullptr;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/Nerve/NerveStateCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ class NerveStateCtrl {
State* mStates;
State* mCurrentState;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/Network/HtmlViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class HtmlViewer {
public:
void call(const char*, sead::BufferedSafeStringBase<char>*) const;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/Rail/IUseRail.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class IUseRail {
public:
virtual RailRider* getRailRider() const = 0;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/Yaml/ByamlUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ struct PrintParams {
void printByamlIter(const u8*);
void printByamlIter(const ByamlIter&);
void printByamlIter_(const ByamlIter&, PrintParams*);
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Project/HitSensor/HitSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ class HitSensor {
const sead::Vector3<f32>* mFollowPos; // _48
const sead::Matrix34<f32>* mFollowMtx; // _50
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Project/HitSensor/SensorHitGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ class SensorHitGroup {
s32 mSensorCount = 0;
HitSensor** mSensors;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Project/Item/ActorScoreKeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class ActorScoreKeeper {
Entry* array;
s32 size;
};
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/src/Library/Base/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ bool isEndWithString(const char* pString_0, const char* pString_1) {

return isEqualString(&pString_0[pString0_Len - pString1_Len], pString_1);
}
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/src/Library/LiveActor/LiveActorGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ void LiveActorGroup::makeActorDeadAll() {
mActors[i]->makeActorDead();
}
}
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/src/Library/Math/MathUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ f32 lerpValue(f32 x, f32 y, f32 time) {
time = 1.0f;
return (x * (1.0f - time)) + (time * y);
}
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/src/Library/Nerve/NerveStateCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ void NerveStateCtrl::tryEndCurrentState() {
mCurrentState = nullptr;
}
}
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/src/Library/Placement/PlacementInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ void PlacementInfo::set(const ByamlIter& placement_iter, const ByamlIter& zone_i
mPlacementIter = placement_iter;
mZoneIter = zone_iter;
}
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/src/Library/Resource/Resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ void Resource::cleanupResGraphicsFile() {
agl::g3d::ResFile::Cleanup(mResFile);
mResFile = nullptr;
}
}; // namespace al
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/src/Project/HitSensor/HitSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ void HitSensor::addHitSensor(HitSensor* pSensor) {
++mSensorCount;
}
}
}; // namespace al
} // namespace al
6 changes: 4 additions & 2 deletions tools/check-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def common_no_namespace_qualifiers(c, path):

allowed_namespaces = []
for l in nest_level:
if l != "":
if l != "" and l != None:
if "::" not in l:
allowed_namespaces.append(l)
else:
Expand All @@ -59,9 +59,11 @@ def common_no_namespace_qualifiers(c, path):
parts = re.split("([{}])", line)
for x in parts:
if x == "{":
nest_level.append("")
nest_level.append(None)
continue
if x == "}":
if nest_level[-1] != None: # is closing namespace
if CHECK(lambda a:a=="}", line.rstrip(), "Closing namespace expects only \"}\" in line!", path): return
del nest_level[-1]
continue

Expand Down

0 comments on commit 2e10543

Please sign in to comment.