From 17714df247adddd30e466d0ff6d83d7bf101277e Mon Sep 17 00:00:00 2001 From: Webster Sheets Date: Fri, 8 Sep 2023 19:03:28 -0400 Subject: [PATCH] Fix warnings --- src/core/StringUtils.h | 2 +- src/pigui/PerfInfo.cpp | 1 + src/pigui/PiGui.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/StringUtils.h b/src/core/StringUtils.h index 8fa9e53ac58..90ee6c7dfe0 100644 --- a/src/core/StringUtils.h +++ b/src/core/StringUtils.h @@ -128,7 +128,7 @@ struct SplitString { using reference = std::string_view; // "end" iterator - iter() : m_str(), m_parent(nullptr) {}; + iter() : m_parent(nullptr), m_str() {}; // "live" iterator iter(SplitString *parent) : m_parent(parent), diff --git a/src/pigui/PerfInfo.cpp b/src/pigui/PerfInfo.cpp index b0c63b11f80..c8ab2da3407 100644 --- a/src/pigui/PerfInfo.cpp +++ b/src/pigui/PerfInfo.cpp @@ -114,6 +114,7 @@ PerfInfo::CounterInfo &PerfInfo::GetCounter(CounterType ct) case COUNTER_FPS: return m_fpsCounter; case COUNTER_PHYS: return m_physCounter; case COUNTER_PIGUI: return m_piguiCounter; + default: assert(0); } } diff --git a/src/pigui/PiGui.cpp b/src/pigui/PiGui.cpp index 40f7aea93a6..84963e5084c 100644 --- a/src/pigui/PiGui.cpp +++ b/src/pigui/PiGui.cpp @@ -584,7 +584,7 @@ void Instance::BakeFont(PiFont &font) // Set the ImGui font name for debugging purposes std::string name = fmt::format("{}:{}", font.name(), font.pixelsize()); - strncpy(config.Name, name.c_str(), 40); + strncpy(config.Name, name.c_str(), 39); // The main face of the font should go first in the list, because: //