New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace std::ostringstream usage with fmt::format #11972
Replace std::ostringstream usage with fmt::format #11972
Conversation
a094233
to
664a6af
Compare
Source/Core/UICommon/UICommon.cpp
Outdated
| return fmt::format("{:.{}f} {}", bytes / unit_size, decimals, | ||
| Common::GetStringT(unit_symbols[unit])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be {:.{}Lf} {} to be equivalent since this previously respected the user's locale for the decimal separator.
|
Apart from that locale thing this looks good to me. |
|
I just noticed Joystick::Hat::GetName() is also doing some funky stuff with a char[] buffer that could possibly be simplified with fmt::format. Might I tack it onto this PR? |
|
lol yeah that's very funky. Sure. Is that even threadsafe? Does that produce a copy of the string? |
664a6af
to
ffabb6c
Compare
|
My intuition tells me that it copies the string from rodata into the stack since it's not static. |
Part C of splitting #11913