From 77661f4c594190ff93de4924d62aaac9e112e8a2 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 26 Oct 2013 17:08:28 +0200 Subject: Both the LoadWorlds() function and cAuthenticator now use the cIniFile object from the Root::Start() function. --- source/Root.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source/Root.cpp') diff --git a/source/Root.cpp b/source/Root.cpp index 1f6437784..df98c3537 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -149,7 +149,7 @@ void cRoot::Start(void) m_FurnaceRecipe = new cFurnaceRecipe(); LOGD("Loading worlds..."); - LoadWorlds(); + LoadWorlds(IniFile); LOGD("Loading plugin manager..."); m_PluginManager = new cPluginManager(); @@ -160,7 +160,7 @@ void cRoot::Start(void) // This sets stuff in motion LOGD("Starting Authenticator..."); - m_Authenticator.Start(); + m_Authenticator.Start(IniFile); LOGD("Starting worlds..."); StartWorlds(); @@ -245,10 +245,8 @@ void cRoot::LoadGlobalSettings() -void cRoot::LoadWorlds(void) +void cRoot::LoadWorlds(cIniFile IniFile) { - cIniFile IniFile("settings.ini"); IniFile.ReadFile(); - // First get the default world AString DefaultWorldName = IniFile.GetValueSet("Worlds", "DefaultWorld", "world"); m_pDefaultWorld = new cWorld( DefaultWorldName.c_str() ); -- cgit v1.2.3 From cb06f35cb80c2162c3b1e9e329fc81b5d8b417da Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 26 Oct 2013 19:47:12 +0200 Subject: Changed "cIniFile IniFile" to cIniFile & IniFile" --- source/Root.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/Root.cpp') diff --git a/source/Root.cpp b/source/Root.cpp index df98c3537..346bb2c9f 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -245,7 +245,7 @@ void cRoot::LoadGlobalSettings() -void cRoot::LoadWorlds(cIniFile IniFile) +void cRoot::LoadWorlds(cIniFile & IniFile) { // First get the default world AString DefaultWorldName = IniFile.GetValueSet("Worlds", "DefaultWorld", "world"); -- cgit v1.2.3