Added const reference params if possible, removed less 16 size
This commit is contained in:
parent
79680c50c0
commit
aed9a737d6
|
@ -189,15 +189,15 @@ void setNeoMode(bool enable) {
|
||||||
isNeo = enable;
|
isNeo = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLogType(std::string type) {
|
void setLogType(const std::string& type) {
|
||||||
logType = type;
|
logType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLogFilter(std::string type) {
|
void setLogFilter(const std::string& type) {
|
||||||
logFilter = type;
|
logFilter = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setUserName(std::string type) {
|
void setUserName(const std::string& type) {
|
||||||
userName = type;
|
userName = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,15 +234,15 @@ void setMainWindowWidth(u32 width) {
|
||||||
void setMainWindowHeight(u32 height) {
|
void setMainWindowHeight(u32 height) {
|
||||||
m_window_size_H = height;
|
m_window_size_H = height;
|
||||||
}
|
}
|
||||||
void setPkgViewer(std::vector<std::string> pkgList) {
|
void setPkgViewer(const std::vector<std::string>& pkgList) {
|
||||||
m_pkg_viewer.resize(pkgList.size());
|
m_pkg_viewer.resize(pkgList.size());
|
||||||
m_pkg_viewer = pkgList;
|
m_pkg_viewer = pkgList;
|
||||||
}
|
}
|
||||||
void setElfViewer(std::vector<std::string> elfList) {
|
void setElfViewer(const std::vector<std::string>& elfList) {
|
||||||
m_elf_viewer.resize(elfList.size());
|
m_elf_viewer.resize(elfList.size());
|
||||||
m_elf_viewer = elfList;
|
m_elf_viewer = elfList;
|
||||||
}
|
}
|
||||||
void setRecentFiles(std::vector<std::string> recentFiles) {
|
void setRecentFiles(const std::vector<std::string>& recentFiles) {
|
||||||
m_recent_files.resize(recentFiles.size());
|
m_recent_files.resize(recentFiles.size());
|
||||||
m_recent_files = recentFiles;
|
m_recent_files = recentFiles;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,10 +43,10 @@ void setScreenHeight(u32 height);
|
||||||
void setFullscreenMode(bool enable);
|
void setFullscreenMode(bool enable);
|
||||||
void setLanguage(u32 language);
|
void setLanguage(u32 language);
|
||||||
void setNeoMode(bool enable);
|
void setNeoMode(bool enable);
|
||||||
void setUserName(std::string type);
|
void setUserName(const std::string& type);
|
||||||
|
|
||||||
void setLogType(std::string type);
|
void setLogType(const std::string& type);
|
||||||
void setLogFilter(std::string type);
|
void setLogFilter(const std::string& type);
|
||||||
|
|
||||||
void setVkValidation(bool enable);
|
void setVkValidation(bool enable);
|
||||||
void setVkSyncValidation(bool enable);
|
void setVkSyncValidation(bool enable);
|
||||||
|
@ -67,9 +67,9 @@ void setSliderPositonGrid(u32 pos);
|
||||||
void setTableMode(u32 mode);
|
void setTableMode(u32 mode);
|
||||||
void setMainWindowWidth(u32 width);
|
void setMainWindowWidth(u32 width);
|
||||||
void setMainWindowHeight(u32 height);
|
void setMainWindowHeight(u32 height);
|
||||||
void setPkgViewer(std::vector<std::string> pkgList);
|
void setPkgViewer(const std::vector<std::string>& pkgList);
|
||||||
void setElfViewer(std::vector<std::string> elfList);
|
void setElfViewer(const std::vector<std::string>& elfList);
|
||||||
void setRecentFiles(std::vector<std::string> recentFiles);
|
void setRecentFiles(const std::vector<std::string>& recentFiles);
|
||||||
|
|
||||||
u32 getMainWindowGeometryX();
|
u32 getMainWindowGeometryX();
|
||||||
u32 getMainWindowGeometryY();
|
u32 getMainWindowGeometryY();
|
||||||
|
|
|
@ -94,7 +94,7 @@ namespace Common {
|
||||||
|
|
||||||
// This function divides a u128 by a u32 value and produces two u64 values:
|
// This function divides a u128 by a u32 value and produces two u64 values:
|
||||||
// the result of division and the remainder
|
// the result of division and the remainder
|
||||||
[[nodiscard]] static inline std::pair<u64, u64> Divide128On32(u128 dividend, u32 divisor) {
|
[[nodiscard]] static inline std::pair<u64, u64> Divide128On32(const u128& dividend, u32 divisor) {
|
||||||
u64 remainder = dividend[0] % divisor;
|
u64 remainder = dividend[0] % divisor;
|
||||||
u64 accum = dividend[0] / divisor;
|
u64 accum = dividend[0] / divisor;
|
||||||
if (dividend[1] == 0)
|
if (dividend[1] == 0)
|
||||||
|
|
|
@ -60,7 +60,7 @@ bool PlaygoFile::LoadChunks(const Common::FS::IOFile& file) {
|
||||||
return false;
|
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) {
|
std::string& data) {
|
||||||
if (file.IsOpen()) {
|
if (file.IsOpen()) {
|
||||||
if (file.Seek(chunk.offset)) {
|
if (file.Seek(chunk.offset)) {
|
||||||
|
|
|
@ -123,7 +123,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
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:
|
private:
|
||||||
PlaygoHeader playgoHeader;
|
PlaygoHeader playgoHeader;
|
||||||
|
|
|
@ -9,7 +9,7 @@ PSF::PSF() = default;
|
||||||
|
|
||||||
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()) {
|
if (!psfBuffer.empty()) {
|
||||||
psf.resize(psfBuffer.size());
|
psf.resize(psfBuffer.size());
|
||||||
psf = psfBuffer;
|
psf = psfBuffer;
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
PSF();
|
PSF();
|
||||||
~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);
|
std::string GetString(const std::string& key);
|
||||||
u32 GetInteger(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;
|
return f32(rational.num) / rational.den;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ struct fmt::formatter<Shader::IR::Opcode> {
|
||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::Opcode& op, FormatContext& ctx) const {
|
auto format(const Shader::IR::Opcode op, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(op));
|
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(op));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue