diff options
author | Lioncash <mathew1800@gmail.com> | 2020-10-13 08:10:50 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-10-13 13:16:49 -0400 |
commit | 39c8d18feba8eafcd43fbb55e73ae150a1947aad (patch) | |
tree | 9565ff464bbb9e5a0aa66e6e310098314e88d019 /src/core/frontend/framebuffer_layout.cpp | |
parent | d291fc1a517d0db07e4b32f5b4ad294c5e93e984 (diff) |
core/CMakeLists: Make some warnings errors
Makes our error coverage a little more consistent across the board by
applying it to Linux side of things as well. This also makes it more
consistent with the warning settings in other libraries in the project.
This also updates httplib to 0.7.9, as there are several warning
cleanups made that allow us to enable several warnings as errors.
Diffstat (limited to 'src/core/frontend/framebuffer_layout.cpp')
-rw-r--r-- | src/core/frontend/framebuffer_layout.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index c1fbc235ba..1acc82497f 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp @@ -14,8 +14,8 @@ namespace Layout { template <class T> static Common::Rectangle<T> MaxRectangle(Common::Rectangle<T> window_area, float screen_aspect_ratio) { - float scale = std::min(static_cast<float>(window_area.GetWidth()), - window_area.GetHeight() / screen_aspect_ratio); + const float scale = std::min(static_cast<float>(window_area.GetWidth()), + static_cast<float>(window_area.GetHeight()) / screen_aspect_ratio); return Common::Rectangle<T>{0, 0, static_cast<T>(std::round(scale)), static_cast<T>(std::round(scale * screen_aspect_ratio))}; } @@ -27,7 +27,7 @@ FramebufferLayout DefaultFrameLayout(u32 width, u32 height) { // so just calculate them both even if the other isn't showing. FramebufferLayout res{width, height, false, {}}; - const float window_aspect_ratio = static_cast<float>(height) / width; + const float window_aspect_ratio = static_cast<float>(height) / static_cast<float>(width); const float emulation_aspect_ratio = EmulationAspectRatio( static_cast<AspectRatio>(Settings::values.aspect_ratio.GetValue()), window_aspect_ratio); |