Merge pull request #1066 from alex85k/patch-path-cstr

Obtain char* from boost::filesystem::path on all systems
This commit is contained in:
Dennis Luxen 2014-06-06 12:02:32 +02:00
commit 9cd91ae99c
3 changed files with 6 additions and 6 deletions

View File

@ -310,7 +310,7 @@ int main(const int argc, const char *argv[])
shared_layout_ptr->coordinate_list_size = coordinate_list_size;
// load geometries sizes
std::ifstream geometry_input_stream(geometries_data_path.c_str(), std::ios::binary);
std::ifstream geometry_input_stream(geometries_data_path.string().c_str(), std::ios::binary);
unsigned number_of_geometries_indices = 0;
unsigned number_of_compressed_geometries = 0;

View File

@ -177,7 +177,7 @@ int main(int argc, char *argv[])
tbb::task_scheduler_init init(real_num_threads);
/*** Setup Scripting Environment ***/
ScriptingEnvironment scripting_environment(profile_path.c_str());
ScriptingEnvironment scripting_environment(profile_path.string().c_str());
bool file_has_pbf_format(false);
std::string output_file_name = input_path.string();
@ -229,11 +229,11 @@ int main(int argc, char *argv[])
BaseParser *parser;
if (file_has_pbf_format)
{
parser = new PBFParser(input_path.c_str(), extractor_callbacks, scripting_environment);
parser = new PBFParser(input_path.string().c_str(), extractor_callbacks, scripting_environment);
}
else
{
parser = new XMLParser(input_path.c_str(), extractor_callbacks, scripting_environment);
parser = new XMLParser(input_path.string().c_str(), extractor_callbacks, scripting_environment);
}
if (!parser->ReadHeader())

View File

@ -232,10 +232,10 @@ int main(int argc, char *argv[])
luaL_openlibs(lua_state);
// adjust lua load path
luaAddScriptFolderToLoadPath(lua_state, profile_path.c_str());
luaAddScriptFolderToLoadPath(lua_state, profile_path.string().c_str());
// Now call our function in a lua script
if (0 != luaL_dofile(lua_state, profile_path.c_str()))
if (0 != luaL_dofile(lua_state, profile_path.string().c_str()))
{
std::cerr << lua_tostring(lua_state, -1) << " occured in scripting block" << std::endl;
return 1;