From 5ca7fb9b6744ccad16feda0d4a14132cbce6cd30 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 23 Jun 2015 10:34:21 +0200 Subject: ifstream/ostream take std::string --- src/cmd/compress.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cmd/compress.cpp') diff --git a/src/cmd/compress.cpp b/src/cmd/compress.cpp index d7456fc31..6c6a98720 100644 --- a/src/cmd/compress.cpp +++ b/src/cmd/compress.cpp @@ -42,7 +42,7 @@ int compress(int argc, char* argv[]) } const std::string in_file = argv[1]; - std::ifstream in(in_file.c_str()); + std::ifstream in(in_file); if(!in.good()) { @@ -62,7 +62,7 @@ int compress(int argc, char* argv[]) } const std::string out_file = in_file + "." + suffix; - std::ofstream out(out_file.c_str()); + std::ofstream out(out_file); do_compress(*compress, in, out); @@ -84,7 +84,7 @@ void parse_extension(const std::string& in_file, int uncompress(int argc, char* argv[]) { const std::string in_file = argv[1]; - std::ifstream in(in_file.c_str()); + std::ifstream in(in_file); if(!in.good()) { @@ -95,7 +95,7 @@ int uncompress(int argc, char* argv[]) std::string out_file, suffix; parse_extension(in_file, out_file, suffix); - std::ofstream out(out_file.c_str()); + std::ofstream out(out_file); std::unique_ptr decompress(make_decompressor(suffix)); -- cgit v1.2.3