pcsx2: Pass IsoFile parameter by reference

Coverity CID 146905, 146906: Big parameter passed by value
(PASS_BY_VALUE)
This commit is contained in:
Jonathan Li 2015-10-05 00:01:46 +01:00
parent 1093c816d0
commit 5856d77371
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ std::pair<u32,u32> ElfTextRange;
wxString LastELF;
// All of ElfObjects functions.
ElfObject::ElfObject(const wxString& srcfile, IsoFile isofile)
ElfObject::ElfObject(const wxString& srcfile, IsoFile& isofile)
: data( wxULongLong(isofile.getLength()).GetLo(), L"ELF headers" )
, proghead( NULL )
, secthead( NULL )
@ -138,7 +138,7 @@ std::pair<u32,u32> ElfObject::getTextRange()
return std::make_pair(0,0);
}
void ElfObject::readIso(IsoFile file)
void ElfObject::readIso(IsoFile& file)
{
int rsize = file.read(data.GetPtr(), data.GetSizeInBytes());
if (rsize < data.GetSizeInBytes()) throw Exception::EndOfStream(filename);

View File

@ -132,7 +132,7 @@ class ElfObject
wxString filename;
void initElfHeaders();
void readIso(IsoFile file);
void readIso(IsoFile& file);
void readFile();
void checkElfSize(s64 elfsize);
@ -144,7 +144,7 @@ class ElfObject
// C++ does all the cleanup automagically for us.
virtual ~ElfObject() throw() { }
ElfObject(const wxString& srcfile, IsoFile isofile);
ElfObject(const wxString& srcfile, IsoFile& isofile);
ElfObject( const wxString& srcfile, uint hdrsize );
void loadProgramHeaders();