mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:04:56 +00:00
General: Mark a handful of deduced const variables as const explicitly
Same behavior, but makes it explicit to the reader that these are const. Prevents cases where the reader might assume that just because the variable isn't const qualified that it must be mutable, when it actually isn't.
This commit is contained in:
@@ -187,11 +187,14 @@ void CGuiFrame::LoadWidgetsInGame(CInputStream& in, CSimplePool* sp) {
|
||||
}
|
||||
|
||||
void CGuiFrame::ProcessUserInput(const CFinalInput& input) const {
|
||||
if (input.ControllerIdx() != 0)
|
||||
if (input.ControllerIdx() != 0) {
|
||||
return;
|
||||
for (auto& widget : x2c_widgets) {
|
||||
if (widget->GetIsActive())
|
||||
}
|
||||
|
||||
for (const auto& widget : x2c_widgets) {
|
||||
if (widget->GetIsActive()) {
|
||||
widget->ProcessUserInput(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,12 +33,15 @@ void CGuiSliderGroup::StartIncreasing() {
|
||||
}
|
||||
|
||||
bool CGuiSliderGroup::TestCursorHit(const zeus::CMatrix4f& vp, const zeus::CVector2f& point) const {
|
||||
if (xcc_sliderRangeWidgets[0]->GetWidgetTypeID() != FOURCC('MODL'))
|
||||
if (xcc_sliderRangeWidgets[0]->GetWidgetTypeID() != FOURCC('MODL')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CGuiModel* bar = static_cast<CGuiModel*>(xcc_sliderRangeWidgets[0]);
|
||||
auto& modelTok = bar->GetModel();
|
||||
if (!modelTok || !modelTok.IsLoaded())
|
||||
const auto& modelTok = bar->GetModel();
|
||||
if (!modelTok || !modelTok.IsLoaded()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const zeus::CVector3f& s0 = xcc_sliderRangeWidgets[0]->GetIdlePosition();
|
||||
const zeus::CVector3f& s1 = xcc_sliderRangeWidgets[1]->GetIdlePosition();
|
||||
|
||||
@@ -68,7 +68,7 @@ float CGuiTextSupport::GetCurrentAnimationOverAge() const {
|
||||
if (const CTextRenderBuffer* buf = GetCurrentPageRenderBuffer()) {
|
||||
if (x50_typeEnable) {
|
||||
if (x40_primStartTimes.size()) {
|
||||
auto& lastTime = x40_primStartTimes.back();
|
||||
const auto& lastTime = x40_primStartTimes.back();
|
||||
ret = std::max(ret, (buf->GetPrimitiveCount() - lastTime.second) / x58_chRate + lastTime.first);
|
||||
} else {
|
||||
ret = std::max(ret, buf->GetPrimitiveCount() / x58_chRate);
|
||||
|
||||
@@ -13,23 +13,23 @@
|
||||
namespace urde {
|
||||
|
||||
constexpr std::array BaseMenuNames{
|
||||
"BaseWidget_VisorMenu",
|
||||
"BaseWidget_BeamMenu",
|
||||
"BaseWidget_VisorMenu"sv,
|
||||
"BaseWidget_BeamMenu"sv,
|
||||
};
|
||||
|
||||
constexpr std::array TextNames{
|
||||
"TextPane_VisorMenu",
|
||||
"TextPane_BeamMenu",
|
||||
"TextPane_VisorMenu"sv,
|
||||
"TextPane_BeamMenu"sv,
|
||||
};
|
||||
|
||||
constexpr std::array BaseTitleNames{
|
||||
"basewidget_visormenutitle",
|
||||
"basewidget_beammenutitle",
|
||||
"basewidget_visormenutitle"sv,
|
||||
"basewidget_beammenutitle"sv,
|
||||
};
|
||||
|
||||
constexpr std::array ModelNames{
|
||||
"model_visor",
|
||||
"model_beam",
|
||||
"model_visor"sv,
|
||||
"model_beam"sv,
|
||||
};
|
||||
|
||||
constexpr std::array<std::array<char, 4>, 2> MenuItemOrders{{
|
||||
|
||||
Reference in New Issue
Block a user