Skip to content

Commit

Permalink
Use emplace_back's return value
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Oct 29, 2024
1 parent 1f726bc commit 1547a5c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions imgui-SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ bool Init(sf::Window& window, sf::RenderTarget& target, bool loadDefaultFont)

bool Init(sf::Window& window, const sf::Vector2f& displaySize, bool loadDefaultFont)
{
s_windowContexts.emplace_back(std::make_unique<WindowContext>(&window));

s_currWindowCtx = s_windowContexts.back().get();
s_currWindowCtx = s_windowContexts.emplace_back(std::make_unique<WindowContext>(&window)).get();
ImGui::SetCurrentContext(s_currWindowCtx->imContext);

ImGuiIO& io = ImGui::GetIO();
Expand Down

0 comments on commit 1547a5c

Please sign in to comment.