Skip to content

Commit

Permalink
Clang format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JonBooth78 committed Jan 8, 2024
1 parent 920abf1 commit 77d18e0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/lua/LuaPiGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,11 +884,10 @@ static int l_pigui_set_next_window_pos(lua_State *l)
return 0;
}

static int l_pigui_set_next_window_collapsed(lua_State* l)
static int l_pigui_set_next_window_collapsed(lua_State *l)
{
bool collapsed = true;
if (lua_isboolean(l, 1))
{
if (lua_isboolean(l, 1)) {
collapsed = lua_toboolean(l, 1);
}
PROFILE_SCOPED()
Expand Down Expand Up @@ -2798,7 +2797,7 @@ static int l_pigui_color_edit(lua_State *l)
const auto lua_flags = LuaPull<ImGuiColorEditFlags_>(l, 3, ImGuiColorEditFlags_None);

const auto flags = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoDragDrop;
bool ok = ImGui::ColorEdit4(lbl, &color.r, flags | lua_flags );
bool ok = ImGui::ColorEdit4(lbl, &color.r, flags | lua_flags);
LuaPush(l, ok);
LuaPush(l, Color(color));

Expand Down Expand Up @@ -2898,12 +2897,12 @@ static int l_pigui_drag_int_4(lua_State *l)

static int l_pigui_increment_drag(lua_State *l)
{
const char *label = LuaPull<const char*>(l, 1);
const char *label = LuaPull<const char *>(l, 1);
double value = LuaPull<double>(l, 2);
float v_speed = LuaPull<float>(l, 3);
double v_min = LuaPull<double>(l, 4);
double v_max = LuaPull<double>(l, 5);
const char* format = LuaPull<const char*>(l, 6);
const char *format = LuaPull<const char *>(l, 6);
// optional bool - auto false if empty
bool drawProgressBar = LuaPull<bool>(l, 7);

Expand Down Expand Up @@ -3162,7 +3161,7 @@ static int l_pigui_table_set_column_index(lua_State *l)

static int l_pigui_table_setup_column(lua_State *l)
{
ImGuiContext* g = ImGui::GetCurrentContext();
ImGuiContext *g = ImGui::GetCurrentContext();

if (g == NULL || g->CurrentTable == NULL)
return luaL_error(l, "Cannot call tableSetupColumn() outside of a beginTable() / endTable() pair");
Expand Down

0 comments on commit 77d18e0

Please sign in to comment.