diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index e4a918271..cd45ddcf5 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -242,7 +242,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat engine.setScriptConsoleMode (variables["script-console"].as()); engine.setStartupScript (variables["script-run"].as()); engine.setWarningsMode (variables["script-warn"].as()); - engine.setScriptBlacklist (variables["script-blacklist"].as()); + engine.setScriptBlacklist (string::toStdStringVector(variables["script-blacklist"].as())); engine.setScriptBlacklistUse (variables["script-blacklist-use"].as()); engine.setSaveGameFile (variables["load-savegame"].as()); diff --git a/components/files/configurationmanager.cpp b/components/files/configurationmanager.cpp index c50303d97..c7ac976d6 100644 --- a/components/files/configurationmanager.cpp +++ b/components/files/configurationmanager.cpp @@ -240,6 +240,17 @@ std::string EscapeHashString::processString(const std::string & str) return temp; } + +std::vector EscapeHashString::toStdStringVector(const std::vector & vec) +{ + std::vector temp = std::vector(); + for (std::vector::const_iterator it = vec.begin(); it != vec.end(); ++it) + { + temp.push_back(it->toStdString()); + } + return temp; +} + EscapeHashString::EscapeHashString() { } @@ -269,6 +280,11 @@ EscapeHashString::EscapeHashString(InputIterator first, InputIterator last) : st { } +std::string EscapeHashString::toStdString() const +{ + return std::string(* this); +} + const boost::filesystem::path& ConfigurationManager::getGlobalPath() const { return mFixedPath.getGlobalConfigPath(); diff --git a/components/files/configurationmanager.hpp b/components/files/configurationmanager.hpp index 7ef7d6fae..47ecc9eb2 100644 --- a/components/files/configurationmanager.hpp +++ b/components/files/configurationmanager.hpp @@ -95,6 +95,7 @@ class EscapeHashString : public std::string { public: static std::string processString(const std::string & str); + static std::vector toStdStringVector(const std::vector & vec); EscapeHashString(); EscapeHashString(const std::string & str); @@ -104,6 +105,8 @@ class EscapeHashString : public std::string EscapeHashString(size_t n, char c); template EscapeHashString(InputIterator first, InputIterator last); + + std::string toStdString() const; }; } /* namespace Cfg */