mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
Added const reference params if possible, removed less 16 size
This commit is contained in:
@@ -60,7 +60,7 @@ bool PlaygoFile::LoadChunks(const Common::FS::IOFile& file) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PlaygoFile::load_chunk_data(const Common::FS::IOFile& file, const chunk_t& chunk,
|
||||
bool PlaygoFile::load_chunk_data(const Common::FS::IOFile& file, const chunk_t chunk,
|
||||
std::string& data) {
|
||||
if (file.IsOpen()) {
|
||||
if (file.Seek(chunk.offset)) {
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
bool load_chunk_data(const Common::FS::IOFile& file, const chunk_t& chunk, std::string& data);
|
||||
bool load_chunk_data(const Common::FS::IOFile& file, const chunk_t chunk, std::string& data);
|
||||
|
||||
private:
|
||||
PlaygoHeader playgoHeader;
|
||||
|
||||
@@ -9,7 +9,7 @@ PSF::PSF() = default;
|
||||
|
||||
PSF::~PSF() = default;
|
||||
|
||||
bool PSF::open(const std::string& filepath, std::vector<u8> psfBuffer) {
|
||||
bool PSF::open(const std::string& filepath, const std::vector<u8>& psfBuffer) {
|
||||
if (!psfBuffer.empty()) {
|
||||
psf.resize(psfBuffer.size());
|
||||
psf = psfBuffer;
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
PSF();
|
||||
~PSF();
|
||||
|
||||
bool open(const std::string& filepath, std::vector<u8> psfBuffer);
|
||||
bool open(const std::string& filepath, const std::vector<u8>& psfBuffer);
|
||||
|
||||
std::string GetString(const std::string& key);
|
||||
u32 GetInteger(const std::string& key);
|
||||
|
||||
@@ -82,7 +82,7 @@ static s32 CodecTypeToStreamType(AVMediaType codec_type) {
|
||||
}
|
||||
}
|
||||
|
||||
static f32 AVRationalToF32(const AVRational& rational) {
|
||||
static f32 AVRationalToF32(const AVRational rational) {
|
||||
return f32(rational.num) / rational.den;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user