Commit 7661e7b5 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

use correct open mode upon opening an ifstream

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libdatrwxx.su
SVN Revision: 3462
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 621c6839
......@@ -174,8 +174,8 @@ $Id$
std::list<std::string>::const_iterator infile=infiles.begin();
while( infile!=infiles.end())
{
// open input stream for reading next file
std::ifstream ifs(infile->c_str());
// open input stream for reading next file, use correct open mode
std::ifstream ifs(infile->c_str(), datrw::ianystream::openmode(format));
// create an interface to the input stream
datrw::ianystream is(ifs, format);
......
......@@ -13,11 +13,14 @@
*
* REVISIONS and CHANGES
* - 08/07/2008 V1.0 Thomas Forbriger
* - 25/11/2010 V1.1
* - use correct open mode upon ifstream open
*
*
* ============================================================================
*/
#define DATRW_TRACEREADER_CC_VERSION \
"DATRW_TRACEREADER_CC V1.0 "
"DATRW_TRACEREADER_CC V1.1"
#define DATRW_TRACEREADER_CC_CVSID \
"$Id$"
......@@ -102,7 +105,8 @@ namespace datrw {
}
Mindex=1;
Mfilename=filename;
MPis=new std::ifstream(Mfilename.c_str());
MPis=new std::ifstream(Mfilename.c_str(),
datrw::ianystream::openmode(format));
MPias=new datrw::ianystream(*MPis, format, Mdebug);
Mopen=true;
if (Mdebug)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment