Skip to content

Commit

Permalink
clang-tidy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Baalaandaa committed Jan 13, 2025
1 parent db92c1f commit 0844b83
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DummyEngine/Core/Application/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace DummyEngine {
GLFWmonitor* GetMonitor(U32 id) {
int monitors_amount = 0;
GLFWmonitor** monitors = glfwGetMonitors(&monitors_amount);
DE_ASSERT(id < U32(monitors_amount), "Wrong monitor id {} should be between [0, {})", id, monitors_amount); // id >= 0 because of unsigned int
DE_ASSERT(id < U32(monitors_amount), "Wrong monitor id {} should be between [0, {})", id, monitors_amount);
return monitors[id];
}

Expand Down
2 changes: 1 addition & 1 deletion DummyEngine/Core/Console/ConsoleLayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace DummyEngine {
private:
bool show_ = false;
std::string command_;
S32 history_position_ = 0; // signed, for possibility for -1 in runtime
S32 history_position_ = 0;
bool scroll_to_bottom_ = true;
bool just_opened_ = false;
};
Expand Down
2 changes: 1 addition & 1 deletion DummyEngine/Core/Rendering/Renderer/BufferLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace DummyEngine {
return elements_.end();
}
const BufferElement& BufferLayout::operator[](U32 index) const {
DE_ASSERT(index < elements_.size(), "Index out of bounce {} should be between [0,{})", index, elements_.size()); // already >= 0 because of U32
DE_ASSERT(index < elements_.size(), "Index out of bounce {} should be between [0,{})", index, elements_.size());
return elements_[index];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ namespace DummyEngine {
}

Ref<Texture> GLFrameBuffer::GetColorAttachment(U32 attachment_id = 0) {
DE_ASSERT(attachment_id < color_attachments_.size(), "Color attachment with index {} does not exist", attachment_id); // already >= 0, because of U32
DE_ASSERT(attachment_id < color_attachments_.size(), "Color attachment with index {} does not exist", attachment_id);
return color_attachments_[attachment_id].Texture;
}
Ref<Texture> GLFrameBuffer::GetDepthAttachment() {
Expand Down

0 comments on commit 0844b83

Please sign in to comment.