fix: CppCheck issues

This commit is contained in:
WerWolv
2025-07-30 17:41:45 +02:00
parent e71e026da0
commit 2c3d8d4c0b
5 changed files with 17 additions and 13 deletions

View File

@@ -772,7 +772,7 @@ EXPORT_MODULE namespace hex {
void pop() const;
[[nodiscard]] operator ImFont*() const;
[[nodiscard]] UnlocalizedString getUnlocalizedName() const { return m_fontName; }
[[nodiscard]] const UnlocalizedString& getUnlocalizedName() const { return m_fontName; }
private:
void push(float size, ImFont *font) const;

View File

@@ -188,7 +188,7 @@ namespace hex::gl {
T &getElement(int row,int col) {
return this->mat[row * Columns+col];
return this->mat[row * Columns + col];
}
Vector<T,Rows> getColumn(int col) {
@@ -205,12 +205,12 @@ namespace hex::gl {
return result;
}
void updateRow(int row, Vector<T,Columns> values) {
void updateRow(int row, const Vector<T, Columns> &values) {
for (size_t i = 0; i < Columns; i++)
this->mat[row * Columns + i] = values[i];
}
void updateColumn(int col, Vector<T,Rows> values) {
void updateColumn(int col, const Vector<T, Rows> &values) {
for (size_t i = 0; i < Rows; i++)
this->mat[i * Columns + col] = values[i];
}