mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 04:06:18 +00:00
refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of strings/paths; allows safe+easy join via operator/ and convenient case-insensitive comparison via operator==, avoids NativePathFromString, similar to boost::filesystem) - NativePath -> OsPath - add hash and To/FromJSVal for Path - add TS_ASSERT_PATH_EQUALS - replace _wfopen_s with sys_OpenFile - remove obsolete SortFiles/Directories This was SVN commit r9107.
This commit is contained in:
@@ -94,7 +94,7 @@ void ScriptingHost::RunScript(const VfsPath& pathname, JSObject* globalObject)
|
||||
jsval rval;
|
||||
JSBool ok = JS_EvaluateUCScript(m_Context, globalObject,
|
||||
reinterpret_cast<const jschar*>(script.c_str()), (uintN)script.size(),
|
||||
CStrW(pathname).ToUTF8().c_str(), 1, &rval);
|
||||
utf8_from_wstring(pathname.string()).c_str(), 1, &rval);
|
||||
|
||||
if (ok == JS_FALSE)
|
||||
throw PSERROR_Scripting_LoadFile_EvalErrors();
|
||||
|
||||
Reference in New Issue
Block a user