2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Silence -Wsign-compare warnings.

This commit is contained in:
Rohit Nirmal 2015-10-06 21:28:19 -05:00
parent 87eca546b2
commit 32391cffdd
4 changed files with 9 additions and 9 deletions

View file

@ -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<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 them
for (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_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);

View file

@ -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);
}

View file

@ -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;

View file

@ -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;