From 6102ff90584e29788af9293b26bf0816790625e9 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 6 Jun 2024 23:39:26 +0200 Subject: [PATCH] CampaignDataLoader: Make CheckScriptVersion private It is only required for the load method if that succeeds the script version was fine. --- libs/libGamedata/lua/CampaignDataLoader.h | 4 ++-- tests/s25Main/campaign/testCampaignLuaFile.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/libGamedata/lua/CampaignDataLoader.h b/libs/libGamedata/lua/CampaignDataLoader.h index 38b317026..a55d58566 100644 --- a/libs/libGamedata/lua/CampaignDataLoader.h +++ b/libs/libGamedata/lua/CampaignDataLoader.h @@ -18,8 +18,6 @@ class CampaignDataLoader : public LuaInterfaceBase CampaignDataLoader(CampaignDescription& campaignDesc, const boost::filesystem::path& basePath); ~CampaignDataLoader() override; - bool CheckScriptVersion(); - /// Return version of the interface. Changes here reflect breaking changes static unsigned GetVersion(); @@ -30,4 +28,6 @@ class CampaignDataLoader : public LuaInterfaceBase private: CampaignDescription& campaignDesc_; boost::filesystem::path basePath_; + + bool CheckScriptVersion(); }; diff --git a/tests/s25Main/campaign/testCampaignLuaFile.cpp b/tests/s25Main/campaign/testCampaignLuaFile.cpp index 1992d8342..072b80638 100644 --- a/tests/s25Main/campaign/testCampaignLuaFile.cpp +++ b/tests/s25Main/campaign/testCampaignLuaFile.cpp @@ -64,7 +64,6 @@ BOOST_AUTO_TEST_CASE(ScriptVersion) CampaignDataLoader loader(desc, tmp); rttr::test::LogAccessor logAcc; BOOST_TEST_REQUIRE(loader.Load()); - BOOST_TEST(loader.CheckScriptVersion()); logAcc.clearLog(); } @@ -79,7 +78,6 @@ BOOST_AUTO_TEST_CASE(ScriptVersion) CampaignDataLoader loader(desc, tmp); rttr::test::LogAccessor logAcc; BOOST_TEST_REQUIRE(loader.Load()); - BOOST_TEST(loader.CheckScriptVersion()); logAcc.clearLog(); BOOST_TEST_PASSPOINT(); }