1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

VCMIDirs update #6

- Minor fixes
- CLoadFile updated to boost::filesystem::path
This commit is contained in:
Karol
2014-08-27 12:31:58 +02:00
parent a34d148fa3
commit 53ab0593b7
8 changed files with 25 additions and 34 deletions

View File

@ -86,7 +86,7 @@ shared_ptr<rett> createAny(const boost::filesystem::path& libpath, const std::st
#endif
if (!dll)
{
logGlobal->errorStream() << "Cannot open dynamic library ("<<libpath<<"). Throwing...";
logGlobal->errorStream() << "Cannot open dynamic library ("<<libpath<<"). Throwing...";
throw std::runtime_error("Cannot open dynamic library");
}
else if(!getName || !getAI)
@ -113,9 +113,9 @@ shared_ptr<rett> createAny(const boost::filesystem::path& libpath, const std::st
}
template<typename rett>
shared_ptr<rett> createAnyAI(std::string dllname, std::string methodName)
shared_ptr<rett> createAnyAI(std::string dllname, const std::string& methodName)
{
logGlobal->infoStream() << "Opening " << dllname;
logGlobal->infoStream() << "Opening " << dllname;
const boost::filesystem::path filePath =
VCMIDirs::get().libraryPath() / "AI" / VCMIDirs::get().libraryName(dllname);
auto ret = createAny<rett>(filePath, methodName);