aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llfile.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:35 -0500
committerJacek Antonelli2008-08-15 23:45:35 -0500
commit7a29b2d1cd471767b58ea30f53900cd2c5a9637c (patch)
treea2f7b5eb90ec41f903f2558e57d47f5ebd913a8f /linden/indra/llcommon/llfile.cpp
parentSecond Life viewer sources 1.19.1.0 (diff)
downloadmeta-impy-7a29b2d1cd471767b58ea30f53900cd2c5a9637c.zip
meta-impy-7a29b2d1cd471767b58ea30f53900cd2c5a9637c.tar.gz
meta-impy-7a29b2d1cd471767b58ea30f53900cd2c5a9637c.tar.bz2
meta-impy-7a29b2d1cd471767b58ea30f53900cd2c5a9637c.tar.xz
Second Life viewer sources 1.19.1.1
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llfile.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp
index 6ccf6ac..d551f28 100644
--- a/linden/indra/llcommon/llfile.cpp
+++ b/linden/indra/llcommon/llfile.cpp
@@ -266,6 +266,7 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */
266 } 266 }
267 llassert(_Filebuffer==NULL); 267 llassert(_Filebuffer==NULL);
268 _Filebuffer = new _Myfb(filep); 268 _Filebuffer = new _Myfb(filep);
269 _ShouldClose = true;
269 _Myios::init(_Filebuffer); 270 _Myios::init(_Filebuffer);
270} 271}
271 272
@@ -279,14 +280,17 @@ void llofstream::close()
279llofstream::llofstream(const char *_Filename, 280llofstream::llofstream(const char *_Filename,
280 std::ios_base::openmode _Mode, 281 std::ios_base::openmode _Mode,
281 int _Prot) 282 int _Prot)
282 : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL) 283 : std::basic_ostream<char,std::char_traits < char > >(NULL,true),_Filebuffer(NULL),_ShouldClose(false)
283{ // construct with named file and specified mode 284{ // construct with named file and specified mode
284 open(_Filename, _Mode , _Prot); /* Flawfinder: ignore */ 285 open(_Filename, _Mode , _Prot); /* Flawfinder: ignore */
285} 286}
286 287
287llofstream::~llofstream() 288llofstream::~llofstream()
288{ // destroy the object 289{ // destroy the object
289 close(); 290 if (_ShouldClose)
291 {
292 close();
293 }
290 delete _Filebuffer; 294 delete _Filebuffer;
291} 295}
292 296