mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: Pass IsoFile parameter by reference
Coverity CID 146905, 146906: Big parameter passed by value (PASS_BY_VALUE)
This commit is contained in:
parent
1093c816d0
commit
5856d77371
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue