VERY experimental Nintendo Switch 2 emulator
C++
Silence -Wsign-compare warnings.
Rohit Nirmalc157d4ddd6f4
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cppindex f915d2bab2..a5a5fe6b03 100644--- a/src/citra_qt/debugger/graphics_vertex_shader.cpp+++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp@@ -294,16 +294,16 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con{// Highlight current instructionint current_record_index = par->cycle_index->value();- if (current_record_index < par->debug_data.records.size()) {+ if (current_record_index < static_cast<int>(par->debug_data.records.size())) {const auto& current_record = par->debug_data.records[current_record_index];- if (index.row() == current_record.instruction_offset) {+ if (index.row() == static_cast<int>(current_record.instruction_offset)) {return QColor(255, 255, 63);}}// Use a grey background for instructions which have no debug data associated to themfor (const auto& record : par->debug_data.records)- if (index.row() == record.instruction_offset)+ if (index.row() == static_cast<int>(record.instruction_offset))return QVariant();return QBrush(QColor(192, 192, 192));@@ -494,7 +494,7 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_ddebug_data = Pica::Shader::ProduceDebugInfo(input_vertex, num_attributes, shader_config, shader_setup);// Reload widget state- for (unsigned int attr = 0; attr < num_attributes; ++attr) {+ for (int attr = 0; attr < num_attributes; ++attr) {unsigned source_attr = shader_config.input_register_map.GetRegisterForAttribute(attr);input_data_mapping[source_attr]->setText(QString("-> v%1").arg(attr));input_data_container[source_attr]->setVisible(true);diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cppindex c101265130..00fa995f65 100644--- a/src/core/hle/kernel/thread.cpp+++ b/src/core/hle/kernel/thread.cpp@@ -220,7 +220,7 @@ static void SwitchContext(Thread* new_thread) {// Clean up the thread's wait_objects, they'll be restored if needed during// the svcWaitSynchronization call- for (int i = 0; i < new_thread->wait_objects.size(); ++i) {+ for (size_t i = 0; i < new_thread->wait_objects.size(); ++i) {SharedPtr<WaitObject> object = new_thread->wait_objects[i];object->RemoveWaitingThread(new_thread);}diff --git a/src/core/hw/y2r.cpp b/src/core/hw/y2r.cppindex 15f96ced84..48c45564fd 100644--- a/src/core/hw/y2r.cpp+++ b/src/core/hw/y2r.cpp@@ -324,7 +324,7 @@ void PerformConversion(ConversionConfiguration& cvt) {u32* output_buffer = reinterpret_cast<u32*>(data_buffer.get());- for (int i = 0; i < num_tiles; ++i) {+ for (size_t i = 0; i < num_tiles; ++i) {int image_strip_width = 0;int output_stride = 0;diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cppindex 50eb157a55..a613fe1366 100644--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp@@ -69,7 +69,7 @@ void RasterizerOpenGL::InitObjects() {}// Create sampler objects- for (int i = 0; i < texture_samplers.size(); ++i) {+ for (size_t i = 0; i < texture_samplers.size(); ++i) {texture_samplers[i].Create();state.texture_units[i].sampler = texture_samplers[i].sampler.handle;}@@ -601,8 +601,8 @@ void RasterizerOpenGL::SyncFramebuffer() {PAddr cur_fb_depth_addr = regs.framebuffer.GetDepthBufferPhysicalAddress();Pica::Regs::DepthFormat new_fb_depth_format = regs.framebuffer.depth_format;- bool fb_size_changed = fb_color_texture.width != regs.framebuffer.GetWidth() ||- fb_color_texture.height != regs.framebuffer.GetHeight();+ bool fb_size_changed = fb_color_texture.width != static_cast<GLsizei>(regs.framebuffer.GetWidth()) ||+ fb_color_texture.height != static_cast<GLsizei>(regs.framebuffer.GetHeight());bool color_fb_prop_changed = fb_color_texture.format != new_fb_color_format ||fb_size_changed;