fix 4 warnings (#4922)

1. pragma in cpp
2. missing return
3. unnecessary function call
4. remove impossible null check
This commit is contained in:
Philip Dubé 2025-01-20 23:03:21 +00:00 committed by GitHub
parent eab11d7f56
commit 936b159a67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 2 additions and 6 deletions

View File

@ -196,7 +196,6 @@ void TimeDisplayWindow::Draw() {
uint16_t textureIndex = 0; uint16_t textureIndex = 0;
for (size_t i = 0; i < textLength; i++) { for (size_t i = 0; i < textLength; i++) {
ImVec2 originalCursorPos = ImGui::GetCursorPos();
if (textToDecode[i] == ':' || textToDecode[i] == '.') { if (textToDecode[i] == ':' || textToDecode[i] == '.') {
textureIndex = 10; textureIndex = 10;
} else { } else {

View File

@ -402,6 +402,7 @@ static bool EntranceHandler(std::shared_ptr<Ship::Console> Console, const std::v
gPlayState->transitionTrigger = TRANS_TRIGGER_START; gPlayState->transitionTrigger = TRANS_TRIGGER_START;
gPlayState->transitionType = TRANS_TYPE_INSTANT; gPlayState->transitionType = TRANS_TYPE_INSTANT;
gSaveContext.nextTransitionType = TRANS_TYPE_INSTANT; gSaveContext.nextTransitionType = TRANS_TYPE_INSTANT;
return 0;
} }
static bool VoidHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) { static bool VoidHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args, std::string* output) {

View File

@ -180,9 +180,7 @@ void MessageDebug_StartTextBox(const char* tableId, uint16_t textId, uint8_t lan
Font* font = &msgCtx->font; Font* font = &msgCtx->font;
sMessageHasSetSfx = 0; sMessageHasSetSfx = 0;
for (u32 i = 0; i < FONT_CHAR_TEX_SIZE * 120; i += FONT_CHAR_TEX_SIZE) { for (u32 i = 0; i < FONT_CHAR_TEX_SIZE * 120; i += FONT_CHAR_TEX_SIZE) {
if (&font->charTexBuf[i] != nullptr) { gSPInvalidateTexCache(play->state.gfxCtx->polyOpa.p++, reinterpret_cast<uintptr_t>(&font->charTexBuf[i]));
gSPInvalidateTexCache(play->state.gfxCtx->polyOpa.p++, reinterpret_cast<uintptr_t>(&font->charTexBuf[i]));
}
} }
R_TEXT_CHAR_SCALE = 75; R_TEXT_CHAR_SCALE = 75;
R_TEXT_LINE_SPACING = 12; R_TEXT_LINE_SPACING = 12;

View File

@ -1,5 +1,3 @@
#pragma once
#include "performanceTimer.h" #include "performanceTimer.h"
void StartPerformanceTimer(TimerID timer){ void StartPerformanceTimer(TimerID timer){