From 58581f2ac25b68b6dd08b2336514f679af40fb64 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 14 Oct 2022 23:52:53 +0200 Subject: Fixed ContentBundle loading locale at init --- StarsEx/ContentBundle.cpp | 10 ++-------- StarsEx/ContentBundle.h | 3 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/StarsEx/ContentBundle.cpp b/StarsEx/ContentBundle.cpp index cd10893..99fee45 100644 --- a/StarsEx/ContentBundle.cpp +++ b/StarsEx/ContentBundle.cpp @@ -25,15 +25,9 @@ ContentBundle* ContentBundle::GetInstance() // +--------------------------------------------------------------------+ -ContentBundle::ContentBundle() : ContentBundle("content", nullptr) +ContentBundle::ContentBundle(Locale* locale) { -} - -// +--------------------------------------------------------------------+ - -ContentBundle::ContentBundle(const char* bundle, Locale* locale) -{ - Load(bundle, locale); + UseLocale(locale); } // +--------------------------------------------------------------------+ diff --git a/StarsEx/ContentBundle.h b/StarsEx/ContentBundle.h index ffcc7e1..da2fb0d 100644 --- a/StarsEx/ContentBundle.h +++ b/StarsEx/ContentBundle.h @@ -28,8 +28,7 @@ public: static ContentBundle* GetInstance(); - ContentBundle(); - ContentBundle(const char* bundle, Locale* locale); + explicit ContentBundle(Locale* locale=nullptr); virtual ~ContentBundle(); bool Init(); -- cgit v1.1