summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfile.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-03-15 01:18:27 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-03-15 01:18:27 +0000
commit672a76d0ea08a0d0fc824e103ee4c4242b7e03ec (patch)
treeb623a9c884383ad75ed755b2c373db2b90643671 /indra/llcommon/llfile.cpp
parent04611efae8a3291ceba8a29dd920bdae0d404830 (diff)
reverting premature commit at 82410.
Diffstat (limited to 'indra/llcommon/llfile.cpp')
-rw-r--r--indra/llcommon/llfile.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index c44650009d..2a18e5c64c 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -271,11 +271,9 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */
void llofstream::close()
{ // close the C stream
- if(is_open())
- {
- if (_Filebuffer->close() == 0)
- _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/
- }
+ llassert(_Filebuffer);
+ if (_Filebuffer->close() == 0)
+ _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/
}
llofstream::llofstream(const char *_Filename,
@@ -287,8 +285,7 @@ llofstream::llofstream(const char *_Filename,
}
llofstream::~llofstream()
-{
- // destroy the object
+{ // destroy the object
close();
delete _Filebuffer;
}