diff --git a/pcsx2/Elfheader.cpp b/pcsx2/Elfheader.cpp index be4098e6ed..8fb308062c 100644 --- a/pcsx2/Elfheader.cpp +++ b/pcsx2/Elfheader.cpp @@ -26,7 +26,7 @@ std::pair 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 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); diff --git a/pcsx2/Elfheader.h b/pcsx2/Elfheader.h index 2603a06d9b..3ee81ad15a 100644 --- a/pcsx2/Elfheader.h +++ b/pcsx2/Elfheader.h @@ -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();