mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-08 10:35:50 -04:00
Fix some Clang compile warnings
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
#include "m_Do/m_Do_Reset.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#if TARGET_PC
|
||||
#include <format>
|
||||
#include <fmt/ranges.h>
|
||||
#endif
|
||||
|
||||
void dStage_nextStage_c::set(const char* i_stage, s8 i_roomId, s16 i_point, s8 i_layer, s8 i_wipe,
|
||||
u8 i_speed) {
|
||||
@@ -1661,7 +1665,20 @@ static int dStage_playerInit(dStage_dt_c* i_stage, void* i_data, int num, void*
|
||||
player_data++;
|
||||
}
|
||||
if (i == num) {
|
||||
#if TARGET_PC
|
||||
std::vector<s16> valid_points;
|
||||
valid_points.reserve(num);
|
||||
player_data = player->m_entries;
|
||||
for (i = 0; i < num; i++) {
|
||||
valid_points.push_back(player_data->base.angle.z);
|
||||
player_data++;
|
||||
}
|
||||
std::ranges::sort(valid_points);
|
||||
DuskLog.fatal("Failed to find player start point for next stage! Requested point: {}, Valid points: [{}]",
|
||||
point, fmt::join(valid_points, ", "));
|
||||
#else
|
||||
OS_REPORT_ERROR("プレイヤーが発見できません。[No.%d]\n切り替えの情報や処理の確認をお願いします。\n", point);
|
||||
#endif
|
||||
}
|
||||
JUT_ASSERT(1636, i != num);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace dusk {
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Pause", &StubLogPaused);
|
||||
|
||||
ImGui::Text("Line count (this frame): %llu", LineOffsets.size());
|
||||
ImGui::Text("Line count (this frame): %zu", LineOffsets.size());
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
@@ -82,4 +82,4 @@ namespace dusk {
|
||||
StubLogBuffer.clear();
|
||||
LineOffsets.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2276,7 +2276,7 @@ int mDoExt_3Dline_c::init(u16 param_0, int param_1, BOOL param_2) {
|
||||
int sp20 = param_0 * 2;
|
||||
|
||||
field_0x8[0] = JKR_NEW_ARRAY(cXyz, sp20);
|
||||
if (field_0x8 == NULL) {
|
||||
if (field_0x8[0] == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2286,7 +2286,7 @@ int mDoExt_3Dline_c::init(u16 param_0, int param_1, BOOL param_2) {
|
||||
}
|
||||
|
||||
field_0x10[0] = JKR_NEW_ARRAY(mDoExt_3Dline_field_0x10_c, sp20);
|
||||
if (field_0x10 == NULL) {
|
||||
if (field_0x10[0] == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,8 +245,8 @@ int game_main(int argc, char* argv[]) {
|
||||
|
||||
if (parsed_arg_options.count("help"))
|
||||
{
|
||||
printf((arg_options.help() + "\n").c_str());
|
||||
exit(0);
|
||||
printf("%s", (arg_options.help() + "\n").c_str());
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
catch (const cxxopts::exceptions::exception& e) {
|
||||
@@ -310,13 +310,13 @@ bool JKRHeap::dump_sort() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
template <typename T>
|
||||
JHIComPortManager<T>* JHIComPortManager<T>::instance = nullptr;
|
||||
|
||||
template <>
|
||||
JHIComPortManager<JHICmnMem>* JHIComPortManager<JHICmnMem>::instance = nullptr;
|
||||
|
||||
#ifdef __MWERKS__
|
||||
template<>
|
||||
Z2WolfHowlMgr* JASGlobalInstance<Z2WolfHowlMgr>::sInstance JAS_GLOBAL_INSTANCE_INIT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user