From 034267adb22cc50ec7a7fd34fc5d1020f1db7383 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 10 Feb 2020 16:57:56 +0300 Subject: [PATCH] Compilation fix --- Utilities/geometry.h | 24 ++++++++++++++++++++---- rpcs3/Emu/RSX/GL/GLPresent.cpp | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Utilities/geometry.h b/Utilities/geometry.h index e287a7dd68..752e05b6a4 100644 --- a/Utilities/geometry.h +++ b/Utilities/geometry.h @@ -101,15 +101,18 @@ struct size2_base return *this; } - constexpr bool operator == (const size2_base& rhs) const + constexpr bool operator ==(const size2_base& rhs) const { return width == rhs.width && height == rhs.height; } - constexpr bool operator != (const size2_base& rhs) const +#if __cpp_impl_three_way_comparison >= 201711 +#else + constexpr bool operator !=(const size2_base& rhs) const { return width != rhs.width || height != rhs.height; } +#endif template constexpr operator size2_base() const @@ -644,10 +647,13 @@ struct coord_base return position == rhs.position && size == rhs.size; } +#if __cpp_impl_three_way_comparison >= 201711 +#else constexpr bool operator != (const coord_base& rhs) const { return position != rhs.position || size != rhs.size; } +#endif template constexpr operator coord_base() const @@ -876,11 +882,13 @@ struct color4_base { return r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a; } - +#if __cpp_impl_three_way_comparison >= 201711 +#else constexpr bool operator != (const color4_base& rhs) const { return !(*this == rhs); } +#endif void operator *= (const color4_base& rhs) { @@ -950,11 +958,13 @@ struct color3_base { return r == rhs.r && g == rhs.g && b == rhs.b; } - +#if __cpp_impl_three_way_comparison >= 201711 +#else constexpr bool operator != (const color3_base& rhs) const { return !(*this == rhs); } +#endif template constexpr operator color3_base() const @@ -993,10 +1003,13 @@ struct color2_base return r == rhs.r && g == rhs.g; } +#if __cpp_impl_three_way_comparison >= 201711 +#else constexpr bool operator != (const color2_base& rhs) const { return !(*this == rhs); } +#endif template constexpr operator color2_base() const @@ -1024,10 +1037,13 @@ struct color1_base return r == rhs.r; } +#if __cpp_impl_three_way_comparison >= 201711 +#else constexpr bool operator != (const color1_base& rhs) const { return !(*this == rhs); } +#endif template constexpr operator color1_base() const diff --git a/rpcs3/Emu/RSX/GL/GLPresent.cpp b/rpcs3/Emu/RSX/GL/GLPresent.cpp index 541eaf850c..a7b121287f 100644 --- a/rpcs3/Emu/RSX/GL/GLPresent.cpp +++ b/rpcs3/Emu/RSX/GL/GLPresent.cpp @@ -66,7 +66,7 @@ GLuint GLGSRender::get_present_source(gl::present_surface_info* info, const rsx: gl::pixel_unpack_settings unpack_settings; unpack_settings.alignment(1).row_length(info->pitch / 4); - if (!m_flip_tex_color || m_flip_tex_color->size2D() != sizei{ static_cast(info->width), static_cast(info->height) }) + if (!m_flip_tex_color || m_flip_tex_color->size2D() != sizeu{info->width, info->height}) { m_flip_tex_color = std::make_unique(GL_TEXTURE_2D, info->width, info->height, 1, 1, GL_RGBA8); }