mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Define class static ints that are used in tests.
GCC doesn't like static const ints that don't have a separate definition.
This commit is contained in:
@@ -37,6 +37,12 @@ namespace fs = boost::filesystem;
|
||||
namespace lc = boost::locale;
|
||||
|
||||
namespace loot {
|
||||
const unsigned int GameSettings::autodetect = 0;
|
||||
const unsigned int GameSettings::tes4 = 1;
|
||||
const unsigned int GameSettings::tes5 = 2;
|
||||
const unsigned int GameSettings::fo3 = 3;
|
||||
const unsigned int GameSettings::fonv = 4;
|
||||
|
||||
GameSettings::GameSettings() : _id(GameSettings::autodetect) {}
|
||||
|
||||
GameSettings::GameSettings(const unsigned int gameCode, const std::string& folder) : _id(gameCode) {
|
||||
|
||||
@@ -61,11 +61,11 @@ namespace loot {
|
||||
boost::filesystem::path MasterlistPath() const;
|
||||
boost::filesystem::path UserlistPath() const;
|
||||
|
||||
static const unsigned int autodetect = 0;
|
||||
static const unsigned int tes4 = 1;
|
||||
static const unsigned int tes5 = 2;
|
||||
static const unsigned int fo3 = 3;
|
||||
static const unsigned int fonv = 4;
|
||||
static const unsigned int autodetect;
|
||||
static const unsigned int tes4;
|
||||
static const unsigned int tes5;
|
||||
static const unsigned int fo3;
|
||||
static const unsigned int fonv;
|
||||
protected:
|
||||
//Creates directory in LOOT folder for LOOT's game-specific files.
|
||||
void CreateLOOTGameFolder();
|
||||
|
||||
@@ -25,6 +25,19 @@
|
||||
#include "language.h"
|
||||
|
||||
namespace loot {
|
||||
const unsigned int Language::any = 0;
|
||||
const unsigned int Language::english = 1;
|
||||
const unsigned int Language::spanish = 2;
|
||||
const unsigned int Language::russian = 3;
|
||||
const unsigned int Language::french = 4;
|
||||
const unsigned int Language::chinese = 5;
|
||||
const unsigned int Language::polish = 6;
|
||||
const unsigned int Language::brazilian_portuguese = 7;
|
||||
const unsigned int Language::finnish = 8;
|
||||
const unsigned int Language::german = 9;
|
||||
const unsigned int Language::danish = 10;
|
||||
const unsigned int Language::korean = 11;
|
||||
|
||||
Language::Language(const unsigned int code) {
|
||||
Construct(code);
|
||||
}
|
||||
|
||||
@@ -39,18 +39,18 @@ namespace loot {
|
||||
std::string Name() const;
|
||||
std::string Locale() const;
|
||||
|
||||
static const unsigned int any = 0; // This shouldn't be used as a selectable language, just for when picking any string in a message.
|
||||
static const unsigned int english = 1;
|
||||
static const unsigned int spanish = 2;
|
||||
static const unsigned int russian = 3;
|
||||
static const unsigned int french = 4;
|
||||
static const unsigned int chinese = 5;
|
||||
static const unsigned int polish = 6;
|
||||
static const unsigned int brazilian_portuguese = 7;
|
||||
static const unsigned int finnish = 8;
|
||||
static const unsigned int german = 9;
|
||||
static const unsigned int danish = 10;
|
||||
static const unsigned int korean = 11;
|
||||
static const unsigned int any; // This shouldn't be used as a selectable language, just for when picking any string in a message.
|
||||
static const unsigned int english;
|
||||
static const unsigned int spanish;
|
||||
static const unsigned int russian;
|
||||
static const unsigned int french;
|
||||
static const unsigned int chinese;
|
||||
static const unsigned int polish;
|
||||
static const unsigned int brazilian_portuguese;
|
||||
static const unsigned int finnish;
|
||||
static const unsigned int german;
|
||||
static const unsigned int danish;
|
||||
static const unsigned int korean;
|
||||
|
||||
static const std::vector<unsigned int> Codes;
|
||||
private:
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
using namespace std;
|
||||
|
||||
namespace loot {
|
||||
const unsigned int Message::say = 0;
|
||||
const unsigned int Message::warn = 1;
|
||||
const unsigned int Message::error = 2;
|
||||
|
||||
Message::Message() : _type(Message::say) {}
|
||||
|
||||
Message::Message(const unsigned int type, const std::string& content,
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace loot {
|
||||
std::vector<MessageContent> Content() const;
|
||||
MessageContent ChooseContent(const unsigned int language) const;
|
||||
|
||||
static const unsigned int say = 0;
|
||||
static const unsigned int warn = 1;
|
||||
static const unsigned int error = 2;
|
||||
static const unsigned int say;
|
||||
static const unsigned int warn;
|
||||
static const unsigned int error;
|
||||
private:
|
||||
unsigned int _type;
|
||||
std::vector<MessageContent> _content;
|
||||
|
||||
Reference in New Issue
Block a user