@@ -166,11 +166,11 @@ namespace chaiscript
166166
167167 static std::string get_error_message (DWORD t_err)
168168 {
169+ typedef LPTSTR StringType;
170+
169171#if defined(_UNICODE) || defined(UNICODE)
170- typedef LPWSTR StringType;
171172 std::wstring retval = L" Unknown Error" ;
172173#else
173- typedef LPSTR StringType;
174174 std::string retval = " Unknown Error" ;
175175#endif
176176 StringType lpMsgBuf = nullptr ;
@@ -182,7 +182,7 @@ namespace chaiscript
182182 NULL ,
183183 t_err,
184184 MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
185- ( StringType) &lpMsgBuf,
185+ reinterpret_cast < StringType>( &lpMsgBuf) ,
186186 0 , NULL ) != 0 && lpMsgBuf)
187187 {
188188 retval = lpMsgBuf;
@@ -264,8 +264,8 @@ namespace chaiscript
264264 std::map<std::string, detail::Loadable_Module_Ptr> m_loaded_modules;
265265 std::set<std::string> m_active_loaded_modules;
266266
267- std::vector<std::string> m_modulepaths ;
268- std::vector<std::string> m_usepaths ;
267+ std::vector<std::string> m_module_paths ;
268+ std::vector<std::string> m_use_paths ;
269269
270270 chaiscript::detail::Dispatch_Engine m_engine;
271271
@@ -299,7 +299,7 @@ namespace chaiscript
299299
300300 // / Evaluates the given file and looks in the 'use' paths
301301 const Boxed_Value internal_eval_file (const std::string &t_filename) {
302- for (const auto &path : m_usepaths )
302+ for (const auto &path : m_use_paths )
303303 {
304304 try {
305305 const auto appendedpath = path + t_filename;
@@ -441,16 +441,16 @@ namespace chaiscript
441441 ChaiScript (const ModulePtr &t_lib,
442442 std::vector<std::string> t_modulepaths = std::vector<std::string>(),
443443 std::vector<std::string> t_usepaths = std::vector<std::string>())
444- : m_modulepaths (std::move(t_modulepaths)), m_usepaths (std::move(t_usepaths))
444+ : m_module_paths (std::move(t_modulepaths)), m_use_paths (std::move(t_usepaths))
445445 {
446- if (m_modulepaths .empty ())
446+ if (m_module_paths .empty ())
447447 {
448- m_modulepaths .push_back (" " );
448+ m_module_paths .push_back (" " );
449449 }
450450
451- if (m_usepaths .empty ())
451+ if (m_use_paths .empty ())
452452 {
453- m_usepaths .push_back (" " );
453+ m_use_paths .push_back (" " );
454454 }
455455
456456 build_eval_system (t_lib);
@@ -465,16 +465,16 @@ namespace chaiscript
465465 // / \param[in] t_usepaths Vector of paths to search when attempting to "use" an included ChaiScript file
466466 ChaiScript ( std::vector<std::string> t_modulepaths = std::vector<std::string>(),
467467 std::vector<std::string> t_usepaths = std::vector<std::string>())
468- : m_modulepaths (std::move(t_modulepaths)), m_usepaths (std::move(t_usepaths))
468+ : m_module_paths (std::move(t_modulepaths)), m_use_paths (std::move(t_usepaths))
469469 {
470- if (m_modulepaths .empty ())
470+ if (m_module_paths .empty ())
471471 {
472- m_modulepaths .push_back (" " );
472+ m_module_paths .push_back (" " );
473473 }
474474
475- if (m_usepaths .empty ())
475+ if (m_use_paths .empty ())
476476 {
477- m_usepaths .push_back (" " );
477+ m_use_paths .push_back (" " );
478478 }
479479
480480#if defined(_POSIX_VERSION) && !defined(__CYGWIN__)
@@ -507,7 +507,7 @@ namespace chaiscript
507507 dllpath = std::string (&buf.front (), pathlen);
508508 }
509509
510- m_modulepaths .insert (m_modulepaths .begin (), dllpath+" /" );
510+ m_module_paths .insert (m_module_paths .begin (), dllpath+" /" );
511511 }
512512#endif
513513
@@ -559,7 +559,7 @@ namespace chaiscript
559559 // / \param[in] t_filename Filename to load and evaluate
560560 Boxed_Value use (const std::string &t_filename)
561561 {
562- for (const auto &path : m_usepaths )
562+ for (const auto &path : m_use_paths )
563563 {
564564 try {
565565 const auto appendedpath = path + t_filename;
@@ -758,7 +758,7 @@ namespace chaiscript
758758
759759 std::vector<std::string> postfixes{" .dll" , " .so" , " .bundle" , " " };
760760
761- for (auto & elem : m_modulepaths)
761+ for (auto & elem : m_module_paths)
762762 {
763763 for (auto & prefix : prefixes)
764764 {
0 commit comments