From 9a9c08391ae1ba1422c977345c27828483c05190 Mon Sep 17 00:00:00 2001 From: William JCM Date: Sat, 15 Jan 2022 10:48:49 +0100 Subject: [PATCH] SaveTool: change how story progress is handled. --- src/Maps/StoryProgress.h | 2 +- src/SaveTool/SaveTool_MainManager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Maps/StoryProgress.h b/src/Maps/StoryProgress.h index 4643b92..054fbbf 100644 --- a/src/Maps/StoryProgress.h +++ b/src/Maps/StoryProgress.h @@ -22,7 +22,7 @@ struct StoryProgressPoint { Int id; const char* chapter; const char* point; - const char* after = ""; + const char* after = nullptr; }; static const Corrade::Containers::Array story_progress diff --git a/src/SaveTool/SaveTool_MainManager.cpp b/src/SaveTool/SaveTool_MainManager.cpp index ce38c70..7b20524 100644 --- a/src/SaveTool/SaveTool_MainManager.cpp +++ b/src/SaveTool/SaveTool_MainManager.cpp @@ -188,7 +188,7 @@ void SaveTool::drawGeneralInfo() { { ImGui::TextUnformatted("Story progress:"); ImGui::SameLine(0.0f, ImGui::GetStyle().ItemSpacing.x / 4.0f); - if(std::strcmp(it->after, "") == 0) { + if(!it->after) { ImGui::TextWrapped("%s - %s", it->chapter, it->point); } else { @@ -261,7 +261,7 @@ void SaveTool::drawGeneralInfo() { } for(const auto& sp : story_progress) { if(ImGui::BeginMenu(sp.chapter)) { - if(std::strcmp(sp.after, "") == 0) { + if(!sp.after) { if(ImGui::MenuItem(sp.point)) { if(!_currentProfile->setStoryProgress(sp.id)) { SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error",