Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 832 vs 835 for /trunk/Source Code/Utility/Localization.cpp

Diff revisions: vs.
  @@ -1,6 +1,6 @@
1 1 #include "Headers/Localization.h"
2 2
3 - #include "Core/Headers/Application.h"
3 + #include "Core/Headers/ErrorCodes.h"
4 4 #include <SimpleINI/include/SimpleIni.h>
5 5
6 6 namespace Divide {
  @@ -10,7 +10,7 @@
10 10 /// Is everything loaded and ready for use?
11 11 static bool g_initialized = false;
12 12
13 - bool init(const stringImpl& newLanguage) {
13 + ErrorCode init(const stringImpl& newLanguage) {
14 14 clear();
15 15
16 16 g_localeFile = newLanguage;
  @@ -21,8 +21,7 @@
21 21 stringImpl file = "localisation/" + g_localeFile + ".ini";
22 22
23 23 if (g_languageFile.LoadFile(file.c_str()) != SI_OK) {
24 - Application::instance().throwError(ErrorCode::NO_LANGUAGE_INI);
25 - return false;
24 + return ErrorCode::NO_LANGUAGE_INI;
26 25 }
27 26
28 27 // Load all key-value pairs for the "language" section
  @@ -41,7 +40,7 @@
41 40 }
42 41
43 42 g_initialized = true;
44 - return true;
43 + return ErrorCode::NO_ERR;
45 44 }
46 45
47 46 void clear() {