[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src filesystem.cpp
From: |
Yann Dirson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src filesystem.cpp |
Date: |
Sat, 08 Jan 2005 16:51:44 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Yann Dirson <address@hidden> 05/01/08 21:12:38
Modified files:
src : filesystem.cpp
Log message:
dropped dead code
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/filesystem.cpp.diff?tr1=1.56&tr2=1.57&r1=text&r2=text
Patches:
Index: wesnoth/src/filesystem.cpp
diff -u wesnoth/src/filesystem.cpp:1.56 wesnoth/src/filesystem.cpp:1.57
--- wesnoth/src/filesystem.cpp:1.56 Sat Jan 8 21:06:09 2005
+++ wesnoth/src/filesystem.cpp Sat Jan 8 21:12:38 2005
@@ -1,4 +1,4 @@
-/* $Id: filesystem.cpp,v 1.56 2005/01/08 21:06:09 ydirson Exp $ */
+/* $Id: filesystem.cpp,v 1.57 2005/01/08 21:12:38 ydirson Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -433,29 +433,9 @@
std::string read_stream(std::istream& s)
{
-#if 1
std::stringstream ss;
ss << s.rdbuf();
return ss.str();
-#else
- std::vector<char> 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()