mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
Update to Boost.Filesystem version 3, since Boost 1.50 drops support for version 2.
Check http://forum.vcmi.eu/viewtopic.php?t=518
This commit is contained in:
parent
758fb0679e
commit
54ca71d598
4
Global.h
4
Global.h
@ -49,8 +49,8 @@
|
||||
#include <memory>
|
||||
#include <cstdlib>
|
||||
|
||||
//filesystem version 3 causes problems (and it's default as of boost 1.46)
|
||||
#define BOOST_FILESYSTEM_VERSION 2
|
||||
//The only available version is 3, as of Boost 1.50
|
||||
#define BOOST_FILESYSTEM_VERSION 3
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
@ -1553,7 +1553,7 @@ int CPlayerInterface::getLastIndex( std::string namePrefix)
|
||||
{
|
||||
if(is_regular(dir->status()))
|
||||
{
|
||||
std::string name = dir->path().leaf();
|
||||
std::string name = dir->path().leaf().string();
|
||||
if(starts_with(name, namePrefix) && ends_with(name, ".vlgm1"))
|
||||
{
|
||||
char nr = name[namePrefix.size()];
|
||||
|
@ -42,7 +42,7 @@ std::vector<CCampaignHeader> CCampaignHandler::getCampaignHeaders(GetMode mode)
|
||||
for ( fs::directory_iterator file (tie); file!=end_iter; ++file )
|
||||
{
|
||||
if(fs::is_regular_file(file->status())
|
||||
&& boost::ends_with(file->path().filename(), ext))
|
||||
&& boost::ends_with(file->path().filename().string(), ext))
|
||||
{
|
||||
ret.push_back( getHeader( file->path().string(), false ) );
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ void CFileUtility::getFilesWithExt(std::vector<FileInfo> &out, const std::string
|
||||
for ( fs::directory_iterator file (tie); file!=end_iter; ++file )
|
||||
{
|
||||
if(fs::is_regular_file(file->status())
|
||||
&& boost::ends_with(file->path().filename(), ext))
|
||||
&& boost::ends_with(file->path().filename().string(), ext))
|
||||
{
|
||||
std::time_t date = 0;
|
||||
try
|
||||
|
@ -285,7 +285,7 @@ void CLodHandler::init(const std::string lodFile, const std::string dirName)
|
||||
if (boost::filesystem::is_directory(dir->status()))
|
||||
{
|
||||
path.resize(dir.level()+1);
|
||||
path.back() = dir->path().leaf();
|
||||
path.back() = dir->path().leaf().string();
|
||||
}
|
||||
if(boost::filesystem::is_regular(dir->status()))
|
||||
{
|
||||
@ -295,7 +295,7 @@ void CLodHandler::init(const std::string lodFile, const std::string dirName)
|
||||
for (size_t i=0; i<dir.level() && i<path.size(); i++)
|
||||
e.realName += path[i] + '/';
|
||||
|
||||
e.realName += dir->path().leaf();
|
||||
e.realName += dir->path().leaf().string();
|
||||
|
||||
initEntry(e, e.realName);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user