From d0afa04f723d94e3c327cc4f2b072954a6730a89 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sat, 8 Jan 2005 21:12:38 +0000 Subject: [PATCH] dropped dead code --- src/filesystem.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/filesystem.cpp b/src/filesystem.cpp index f518fb37241..b388549b734 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -433,29 +433,9 @@ void read_file_internal(const std::string& fname, std::string& res) std::string read_stream(std::istream& s) { -#if 1 std::stringstream ss; ss << s.rdbuf(); return ss.str(); -#else - std::vector v; - const int block_size = 65536; - - size_t nbytes = 1; - while(nbytes > 0) { - v.resize(v.size() + block_size); - nbytes = s.readsome(&v[v.size() - block_size],block_size); - if(nbytes < block_size) { - v.resize(v.size() - (block_size - nbytes)); - break; - } - } - - std::string res; - res.resize(v.size()); - std::copy(v.begin(),v.end(),res.begin()); - return res; -#endif } std::string read_stdin()