Replace hack with use of generic_string from boost::filesystem.
authorCarl Hetherington <cth@carlh.net>
Mon, 18 Apr 2016 21:17:54 +0000 (22:17 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 18 Apr 2016 21:17:54 +0000 (22:17 +0100)
TODO [deleted file]
src/asset.cc

diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index b30aa69..0000000
--- a/TODO
+++ /dev/null
@@ -1 +0,0 @@
-Rounding of FPS ...?
\ No newline at end of file
index 81321d4da8325962d9c505054ebbf76e76b602ee..296e3bef2f00f89de63b23f05c79e5a9d8febb2c 100644 (file)
@@ -104,14 +104,7 @@ Asset::write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const
        xmlpp::Node* chunk_list = asset->add_child ("ChunkList");
        xmlpp::Node* chunk = chunk_list->add_child ("Chunk");
 
-       /* On Windows path.string() will contain back-slashes; replace these with
-          forward-slashes.  XXX: perhaps there is a nicer way to do this with boost.
-       */
-
-       string path_string = path.get().string ();
-       boost::replace_all (path_string, "\\", "/");
-
-       chunk->add_child("Path")->add_child_text (path_string);
+       chunk->add_child("Path")->add_child_text (path.get().generic_string());
        chunk->add_child("VolumeIndex")->add_child_text ("1");
        chunk->add_child("Offset")->add_child_text ("0");
        chunk->add_child("Length")->add_child_text (raw_convert<string> (boost::filesystem::file_size (_file)));