Skip to content

Commit

Permalink
Use stringstream instead of format since apparently most platforms do…
Browse files Browse the repository at this point in the history
…n't actually support all of c++20 yet boooooo
  • Loading branch information
jbodner09 committed Dec 2, 2023
1 parent cf7f801 commit 0e6ee3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion soh/soh/UIWidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ namespace UIWidgets {
}

if (changed) {
val = std::stof(std::vformat("{:.{}f}", std::make_format_args(val, ticks)));
std::stringstream ss;
ss << std::setprecision(ticks) << val;
val = std::stof(ss.str());
CVarSetFloat(cvarName, val);
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
}
Expand Down
1 change: 0 additions & 1 deletion soh/soh/UIWidgets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <string>
#include <vector>
#include <span>
#include <format>
#include <stdint.h>
#include <ImGui/imgui.h>

Expand Down

0 comments on commit 0e6ee3e

Please sign in to comment.