From 100fa28671af455853a6de1b2d7a3499fa6e185c Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 18 Mar 2016 19:22:43 +1100 Subject: * Remove confusing method from vectorstreams that hide base_ios method (fixes disassembly view) * Allow std::string to pass through core_file unmolested (reduces temporary allocations) * Make zip/7z instances of same class with uniform interface * zippath browsing is broken at the moment This is another step towards transparent archive support. It's now possible to access zip and 7z archives with the same code. Nothing is taking advantage of it yet. There's now some very similar code in fileio.cpp and clifront.cpp that could be folded at some point. --- src/tools/src2html.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tools/src2html.cpp') diff --git a/src/tools/src2html.cpp b/src/tools/src2html.cpp index 9b3110a212f..38260a62879 100644 --- a/src/tools/src2html.cpp +++ b/src/tools/src2html.cpp @@ -517,7 +517,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri // open the source file util::core_file::ptr src; - if (util::core_file::open(srcfile.c_str(), OPEN_FLAG_READ, src) != osd_file::error::NONE) + if (util::core_file::open(srcfile, OPEN_FLAG_READ, src) != osd_file::error::NONE) { fprintf(stderr, "Unable to read file '%s'\n", srcfile.c_str()); return 1; @@ -732,7 +732,7 @@ static util::core_file::ptr create_file_and_output_header(std::string &filename, { // create the indexfile util::core_file::ptr file; - if (util::core_file::open(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, file) != osd_file::error::NONE) + if (util::core_file::open(filename, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, file) != osd_file::error::NONE) return util::core_file::ptr(); // print a header @@ -865,7 +865,7 @@ static bool find_include_file(std::string &srcincpath, int srcrootlen, int dstro // see if we can open it util::core_file::ptr testfile; - if (util::core_file::open(srcincpath.c_str(), OPEN_FLAG_READ, testfile) == osd_file::error::NONE) + if (util::core_file::open(srcincpath, OPEN_FLAG_READ, testfile) == osd_file::error::NONE) { // close the file testfile.reset(); -- cgit v1.2.3-70-g09d2