aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@unitus.it>2003-04-29 21:46:07 +0200
committerPaolo Carlini <paolo@gcc.gnu.org>2003-04-29 19:46:07 +0000
commitcc9d1c78ef92f6a29dc0bb4b4531504320267a20 (patch)
tree221bfb7e12cc711b0fa05c84b3b33b7abfb45afb
parent9193479f3410757fdd5e00670f913c7d8c587923 (diff)
downloadgcc-cc9d1c78ef92f6a29dc0bb4b4531504320267a20.zip
gcc-cc9d1c78ef92f6a29dc0bb4b4531504320267a20.tar.gz
gcc-cc9d1c78ef92f6a29dc0bb4b4531504320267a20.tar.bz2
fstream.tcc (open): Change to single return.
2003-04-29 Paolo Carlini <pcarlini@unitus.it> * include/bits/fstream.tcc (open): Change to single return. From-SVN: r66245
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/include/bits/fstream.tcc11
2 files changed, 8 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 366f5a7..833004c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,9 @@
2003-04-29 Paolo Carlini <pcarlini@unitus.it>
+ * include/bits/fstream.tcc (open): Change to single return.
+
+2003-04-29 Paolo Carlini <pcarlini@unitus.it>
+
* include/std/std_sstream.h (underflow): Change to single return.
2003-04-28 Paolo Carlini <pcarlini@unitus.it>
diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc
index 8d9002e..0dba445 100644
--- a/libstdc++-v3/include/bits/fstream.tcc
+++ b/libstdc++-v3/include/bits/fstream.tcc
@@ -100,13 +100,10 @@ namespace std
if ((__mode & ios_base::ate)
&& this->seekoff(0, ios_base::end, __mode) < 0)
- {
- // 27.8.1.3,4
- this->close();
- return __ret;
- }
-
- __ret = this;
+ // 27.8.1.3,4
+ this->close();
+ else
+ __ret = this;
}
}
return __ret;