Skip to content

Commit

Permalink
Fixed compilation issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed May 22, 2023
1 parent a3a85eb commit 3f20449
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/cpp/re/edit/Grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Grid

ImVec2 fSize;

static const Grid kUnity;
static constexpr Grid unity() { return Grid{}; };

//------------------------------------------------------------------------
// clamp
Expand Down Expand Up @@ -77,8 +77,6 @@ struct Grid
#endif
};

constexpr Grid Grid::kUnity = Grid{};

}

#endif //RE_EDIT_GRID_H
2 changes: 1 addition & 1 deletion src/cpp/re/edit/Panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ void Panel::handleMoveWidgetsAction(AppContext &iCtx, ReGui::Canvas::canvas_pos_
else
{
bool shouldMoveWidgets = false;
auto grid = ImGui::GetIO().KeyAlt ? Grid::kUnity : iCtx.fGrid;
auto grid = ImGui::GetIO().KeyAlt ? Grid::unity() : iCtx.fGrid;
fMoveWidgetsAction->fCurrentPosition = iMousePos;
if(std::abs(fMoveWidgetsAction->fLastUpdatePosition.x - fMoveWidgetsAction->fCurrentPosition.x) >= grid.width())
{
Expand Down

0 comments on commit 3f20449

Please sign in to comment.