From f18e80e899f7996e0525b785c892fcf77cc7052b Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 29 May 2021 03:55:41 +0200 Subject: [PATCH] fix some warning spam --- rpcs3/Emu/NP/np_handler.h | 3 ++- rpcs3/Emu/RSX/GL/GLTextOut.h | 6 +++--- rpcs3/Emu/RSX/VK/VKTextOut.h | 6 +++--- rpcs3/rpcs3qt/memory_string_searcher.cpp | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/NP/np_handler.h b/rpcs3/Emu/NP/np_handler.h index 370bb113e8..8efbeafef9 100644 --- a/rpcs3/Emu/NP/np_handler.h +++ b/rpcs3/Emu/NP/np_handler.h @@ -157,7 +157,8 @@ protected: void GetPingInfoResponse_to_SceNpMatching2SignalingGetPingInfoResponse(const GetPingInfoResponse* resp, SceNpMatching2SignalingGetPingInfoResponse* sce_resp); void RoomMessageInfo_to_SceNpMatching2RoomMessageInfo(const RoomMessageInfo* mi, SceNpMatching2RoomMessageInfo* sce_mi); - struct callback_info { + struct callback_info + { SceNpMatching2ContextId ctx_id; vm::ptr cb; vm::ptr cb_arg; diff --git a/rpcs3/Emu/RSX/GL/GLTextOut.h b/rpcs3/Emu/RSX/GL/GLTextOut.h index 7edadee0cb..28d94e7f91 100644 --- a/rpcs3/Emu/RSX/GL/GLTextOut.h +++ b/rpcs3/Emu/RSX/GL/GLTextOut.h @@ -25,7 +25,7 @@ namespace gl bool initialized = false; bool enabled = false; - double m_scale = 1.0; + f32 m_scale = 1.0f; void init_program() { @@ -140,7 +140,7 @@ namespace gl char *s = const_cast(text.c_str()); //Y is in raster coordinates: convert to bottom-left origin - y = ((target_h / m_scale) - y - 16); + y = (static_cast(target_h / m_scale) - y - 16); //Compress [0, w] and [0, h] into range [-1, 1] float scale_x = m_scale * 2.f / target_w; @@ -213,7 +213,7 @@ namespace gl void set_scale(double scale) { // Restrict scale to 2. The dots are gonna be too sparse otherwise. - m_scale = std::min(scale, 2.0); + m_scale = std::min(static_cast(scale), 2.0f); } }; } diff --git a/rpcs3/Emu/RSX/VK/VKTextOut.h b/rpcs3/Emu/RSX/VK/VKTextOut.h index d7d60f82b7..9556fa80ea 100644 --- a/rpcs3/Emu/RSX/VK/VKTextOut.h +++ b/rpcs3/Emu/RSX/VK/VKTextOut.h @@ -33,7 +33,7 @@ namespace vk u32 m_uniform_buffer_offset = 0; u32 m_uniform_buffer_size = 0; - double m_scale = 1.0; + f32 m_scale = 1.0f; bool initialized = false; std::unordered_map> m_offsets; @@ -295,7 +295,7 @@ namespace vk char *s = const_cast(text.c_str()); //Y is in raster coordinates: convert to bottom-left origin - y = ((target_h / m_scale) - y - 16); + y = (static_cast(target_h / m_scale) - y - 16); //Compress [0, w] and [0, h] into range [-1, 1] //Flip Y scaling @@ -372,7 +372,7 @@ namespace vk void set_scale(double scale) { // Restrict scale to 2. The dots are gonna be too sparse otherwise. - m_scale = std::min(scale, 2.0); + m_scale = std::min(static_cast(scale), 2.0f); } }; } diff --git a/rpcs3/rpcs3qt/memory_string_searcher.cpp b/rpcs3/rpcs3qt/memory_string_searcher.cpp index 20715c5a63..6e5deeb77f 100644 --- a/rpcs3/rpcs3qt/memory_string_searcher.cpp +++ b/rpcs3/rpcs3qt/memory_string_searcher.cpp @@ -196,7 +196,7 @@ void memory_string_searcher::OnSearch() vm::reader_lock rlock; - const named_thread_group workers("String Searcher "sv, max_threads, [&]() + const named_thread_group workers("String Searcher "sv, max_threads, [&]() { u32 local_found = 0;