Skip to content

Commit

Permalink
clang-tidy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
madeso committed Mar 6, 2024
1 parent bbd6c4d commit 1f4bb24
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
5 changes: 4 additions & 1 deletion apps/editor/src/editor/browser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ namespace eu::editor
const auto sub_directory = io::DirPath{"./" + item.name};
const auto resolved = resolve_relative(sub_directory, current_folder);
ASSERTX(resolved.has_value(), sub_directory, current_folder);
current_folder = resolved.value();
if(resolved)
{
current_folder = resolved.value();
}
}
refresh();
}
Expand Down
12 changes: 10 additions & 2 deletions apps/editor/src/editor/main.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#include "log/log.h"

#include "assert/assert.h"

#include "base/mat4.h"
#include "base/random.h"
#include "base/stringutils.h"

#include "io/vfs.h"

#include "core/vfs_imagegenerator.h"
#include "base/stringutils.h"
#include "core/stdutils.h"
#include "core/viewport.h"

Expand Down Expand Up @@ -510,7 +514,11 @@ struct FileHandlerList
)
)
{
handler->open(windows, path.value());
ASSERT(path);
if(path)
{
handler->open(windows, path.value());
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/musikmaskin/src/musikmaskin/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ draw_keys
float spacing
)
{
ImGuiStyle& style = ImGui::GetStyle();
const ImGuiStyle& style = ImGui::GetStyle();
ImDrawList* draw_list = ImGui::GetWindowDrawList();

float y = start_y;
Expand Down
2 changes: 1 addition & 1 deletion apps/runner/src/runner/dukregistry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ namespace eu::runner
}
else
{
sol::error err = val;
const sol::error err = val;
const auto message = fmt::format("Failed to call create for component {0}({1}): {2}", name, core::ecs::c_comp(comp), err.what());
LOG_ERROR("{0}", message);
if(!ctx->has_error)
Expand Down

0 comments on commit 1f4bb24

Please sign in to comment.