Swap wxFileInputStream/wxFileOutputStream for the buffered kind

This commit is contained in:
Marek Roszko 2020-12-12 18:51:35 -05:00
parent 6246824573
commit 7565f60a03
6 changed files with 10 additions and 10 deletions

View File

@ -83,7 +83,7 @@ static bool CopyStreamData( wxInputStream& inputStream, wxOutputStream& outputSt
bool PROJECT_ARCHIVER::Unarchive( const wxString& aSrcFile, const wxString& aDestDir,
REPORTER& aReporter )
{
wxFileInputStream stream( aSrcFile );
wxFFileInputStream stream( aSrcFile );
if( !stream.IsOk() )
{

View File

@ -254,7 +254,7 @@ bool PROJECT_TEMPLATE::CreateProject( wxFileName& aNewProjectPath, wxString* aEr
wxString* PROJECT_TEMPLATE::GetTitle()
{
wxFileInputStream input( GetHtmlFile().GetFullPath() );
wxFFileInputStream input( GetHtmlFile().GetFullPath() );
wxString separator( wxT( "\x9" ) );
wxTextInputStream text( input, separator, wxConvUTF8 );

View File

@ -1160,7 +1160,7 @@ void ALTIUM_PCB::ParseModelsData( const CFB::CompoundFileReader& aReader,
wxMemoryInputStream stepStream( stepContent.get(), stepSize );
wxZlibInputStream zlibInputStream( stepStream );
wxFileOutputStream outputStream( storagePath.GetFullPath() );
wxFFileOutputStream outputStream( storagePath.GetFullPath() );
outputStream.Write( zlibInputStream );
outputStream.Close();

View File

@ -271,7 +271,7 @@ enum FormatType
FormatType fileType( const char* aFileName )
{
wxFileName fname( wxString::FromUTF8Unchecked( aFileName ) );
wxFileInputStream ifile( fname.GetFullPath() );
wxFFileInputStream ifile( fname.GetFullPath() );
if( !ifile.IsOk() )
return FMT_NONE;
@ -460,7 +460,7 @@ bool readSTEP( Handle(TDocStd_Document)& m_doc, const char* fname )
bool readSTEPZ( Handle(TDocStd_Document)& m_doc, const char* aFileName )
{
wxFileName fname( wxString::FromUTF8Unchecked( aFileName ) );
wxFileInputStream ifile( fname.GetFullPath() );
wxFFileInputStream ifile( fname.GetFullPath() );
wxFileName outFile( fname );
@ -473,7 +473,7 @@ bool readSTEPZ( Handle(TDocStd_Document)& m_doc, const char* aFileName )
return false;
{
wxFileOutputStream ofile( outFile.GetFullPath() );
wxFFileOutputStream ofile( outFile.GetFullPath() );
if( !ofile.IsOk() )
return false;

View File

@ -167,7 +167,7 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline )
if( aFileName.Upper().EndsWith( "WRZ" ) )
{
wxFileInputStream ifile( aFileName );
wxFFileInputStream ifile( aFileName );
tmpfilename = wxFileName( aFileName );
tmpfilename.SetPath( wxStandardPaths::Get().GetTempDir() );
@ -179,7 +179,7 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline )
return nullptr;
{
wxFileOutputStream ofile( tmpfilename.GetFullPath() );
wxFFileOutputStream ofile( tmpfilename.GetFullPath() );
if( !ofile.IsOk() )
return nullptr;

View File

@ -996,7 +996,7 @@ bool PCBMODEL::getModelLabel( const std::string& aFileName, TRIPLET aScale, TDF_
case FMT_STEPZ:
{
wxFileInputStream ifile( aFileName );
wxFFileInputStream ifile( aFileName );
wxFileName outFile( aFileName );
outFile.SetPath( wxStandardPaths::Get().GetTempDir() );
@ -1012,7 +1012,7 @@ bool PCBMODEL::getModelLabel( const std::string& aFileName, TRIPLET aScale, TDF_
}
{
wxFileOutputStream ofile( outFile.GetFullPath() );
wxFFileOutputStream ofile( outFile.GetFullPath() );
if( !ofile.IsOk() )
{