From 32391cffdda059f23258b535f386732084d1cac9 Mon Sep 17 00:00:00 2001 From: Rohit Nirmal Date: Tue, 6 Oct 2015 21:28:19 -0500 Subject: Silence -Wsign-compare warnings. --- src/citra_qt/debugger/graphics_vertex_shader.cpp | 8 ++++---- src/core/hle/kernel/thread.cpp | 2 +- src/core/hw/y2r.cpp | 2 +- src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp index f915d2bab..a5a5fe6b0 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 instruction int current_record_index = par->cycle_index->value(); - if (current_record_index < par->debug_data.records.size()) { + if (current_record_index < static_cast(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(current_record.instruction_offset)) { return QColor(255, 255, 63); } } // Use a grey background for instructions which have no debug data associated to them for (const auto& record : par->debug_data.records) - if (index.row() == record.instruction_offset) + if (index.row() == static_cast(record.instruction_offset)) return QVariant(); return QBrush(QColor(192, 192, 192)); @@ -494,7 +494,7 @@ void GraphicsVertexShaderWidget::Reload(bool replace_vertex_data, void* vertex_d debug_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.cpp index c10126513..00fa995f6 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 object = new_thread->wait_objects[i]; object->RemoveWaitingThread(new_thread); } diff --git a/src/core/hw/y2r.cpp b/src/core/hw/y2r.cpp index 15f96ced8..48c45564f 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(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.cpp index 50eb157a5..a613fe136 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(regs.framebuffer.GetWidth()) || + fb_color_texture.height != static_cast(regs.framebuffer.GetHeight()); bool color_fb_prop_changed = fb_color_texture.format != new_fb_color_format || fb_size_changed; -- cgit v1.2.3