made previous commits naming standard compliant

actorid
Marc Zinnschlag 12 years ago
parent 4c28f3211b
commit 2d468fec02

@ -262,7 +262,7 @@ void printRaw(ESM::ESMReader &esm)
int load(Arguments& info) int load(Arguments& info)
{ {
ESM::ESMReader& esm = info.reader; ESM::ESMReader& esm = info.reader;
esm.setEncoding(ToUTF8::CalculateEncoding(info.encoding)); esm.setEncoding(ToUTF8::calculateEncoding(info.encoding));
std::string filename = info.filename; std::string filename = info.filename;
std::cout << "Loading file: " << filename << std::endl; std::cout << "Loading file: " << filename << std::endl;

@ -272,7 +272,7 @@ void DataFilesModel::addMasters(const QString &path)
foreach (const QString &path, dir.entryList()) { foreach (const QString &path, dir.entryList()) {
try { try {
ESM::ESMReader fileReader; ESM::ESMReader fileReader;
fileReader.setEncoding(ToUTF8::CalculateEncoding(mEncoding.toStdString())); fileReader.setEncoding(ToUTF8::calculateEncoding(mEncoding.toStdString()));
fileReader.open(dir.absoluteFilePath(path).toStdString()); fileReader.open(dir.absoluteFilePath(path).toStdString());
ESM::ESMReader::MasterList mlist = fileReader.getMasters(); ESM::ESMReader::MasterList mlist = fileReader.getMasters();
@ -335,7 +335,7 @@ void DataFilesModel::addPlugins(const QString &path)
try { try {
ESM::ESMReader fileReader; ESM::ESMReader fileReader;
fileReader.setEncoding(ToUTF8::CalculateEncoding(mEncoding.toStdString())); fileReader.setEncoding(ToUTF8::calculateEncoding(mEncoding.toStdString()));
fileReader.open(dir.absoluteFilePath(path).toStdString()); fileReader.open(dir.absoluteFilePath(path).toStdString());
ESM::ESMReader::MasterList mlist = fileReader.getMasters(); ESM::ESMReader::MasterList mlist = fileReader.getMasters();

@ -181,8 +181,8 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
// Font encoding settings // Font encoding settings
std::string encoding(variables["encoding"].as<std::string>()); std::string encoding(variables["encoding"].as<std::string>());
std::cout << ToUTF8::EncodingUsingMessage(encoding) << std::endl; std::cout << ToUTF8::encodingUsingMessage(encoding) << std::endl;
engine.setEncoding(ToUTF8::CalculateEncoding(encoding)); engine.setEncoding(ToUTF8::calculateEncoding(encoding));
// directory settings // directory settings
engine.enableFSStrict(variables["fs-strict"].as<bool>()); engine.enableFSStrict(variables["fs-strict"].as<bool>());

@ -358,7 +358,7 @@ std::string ToUTF8::getLegacyEnc(ToUTF8::FromType to)
return std::string(&output[0], outlen); return std::string(&output[0], outlen);
} }
ToUTF8::FromType ToUTF8::CalculateEncoding(const std::string& encodingName) ToUTF8::FromType ToUTF8::calculateEncoding(const std::string& encodingName)
{ {
if (encodingName == "win1250") if (encodingName == "win1250")
return ToUTF8::WINDOWS_1250; return ToUTF8::WINDOWS_1250;
@ -368,7 +368,7 @@ ToUTF8::FromType ToUTF8::CalculateEncoding(const std::string& encodingName)
return ToUTF8::WINDOWS_1252; return ToUTF8::WINDOWS_1252;
} }
std::string ToUTF8::EncodingUsingMessage(const std::string& encodingName) std::string ToUTF8::encodingUsingMessage(const std::string& encodingName)
{ {
if (encodingName == "win1250") if (encodingName == "win1250")
return "Using Central and Eastern European font encoding."; return "Using Central and Eastern European font encoding.";

@ -23,8 +23,8 @@ namespace ToUTF8
std::string getUtf8(FromType from); std::string getUtf8(FromType from);
std::string getLegacyEnc(FromType to); std::string getLegacyEnc(FromType to);
FromType CalculateEncoding(const std::string& encodingName); FromType calculateEncoding(const std::string& encodingName);
std::string EncodingUsingMessage(const std::string& encodingName); std::string encodingUsingMessage(const std::string& encodingName);
} }
#endif #endif

Loading…
Cancel
Save