mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Fix -Wsign-compare warnings
This commit is contained in:
@ -99,7 +99,7 @@ u32 HashEctor(const u8* ptr, size_t length)
|
|||||||
{
|
{
|
||||||
u32 crc = 0;
|
u32 crc = 0;
|
||||||
|
|
||||||
for (int i = 0; i < length; i++)
|
for (size_t i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
crc ^= ptr[i];
|
crc ^= ptr[i];
|
||||||
crc = (crc << 3) | (crc >> 29);
|
crc = (crc << 3) | (crc >> 29);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
|
||||||
UTF8CodePointCountValidator::UTF8CodePointCountValidator(int max_count, QObject* parent)
|
UTF8CodePointCountValidator::UTF8CodePointCountValidator(std::size_t max_count, QObject* parent)
|
||||||
: QValidator(parent), m_max_count(max_count)
|
: QValidator(parent), m_max_count(max_count)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QValidator>
|
#include <QValidator>
|
||||||
|
|
||||||
@ -11,9 +13,10 @@ class UTF8CodePointCountValidator : public QValidator
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit UTF8CodePointCountValidator(int max_count, QObject* parent = nullptr);
|
explicit UTF8CodePointCountValidator(std::size_t max_count, QObject* parent = nullptr);
|
||||||
|
|
||||||
QValidator::State validate(QString& input, int& pos) const override;
|
QValidator::State validate(QString& input, int& pos) const override;
|
||||||
|
|
||||||
int m_max_count;
|
private:
|
||||||
|
std::size_t m_max_count;
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@ bool TASCheckBox::GetValue() const
|
|||||||
if (checkState() == Qt::PartiallyChecked)
|
if (checkState() == Qt::PartiallyChecked)
|
||||||
{
|
{
|
||||||
const u64 frames_elapsed = Movie::GetCurrentFrame() - m_frame_turbo_started;
|
const u64 frames_elapsed = Movie::GetCurrentFrame() - m_frame_turbo_started;
|
||||||
return frames_elapsed % m_turbo_total_frames < m_turbo_press_frames;
|
return static_cast<int>(frames_elapsed % m_turbo_total_frames) < m_turbo_press_frames;
|
||||||
}
|
}
|
||||||
|
|
||||||
return isChecked();
|
return isChecked();
|
||||||
|
Reference in New Issue
Block a user