Fix -Wsign-compare warnings
This commit is contained in:
parent
4b7f784d1b
commit
82f1e6204d
|
@ -99,7 +99,7 @@ u32 HashEctor(const u8* ptr, size_t length)
|
|||
{
|
||||
u32 crc = 0;
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
for (size_t i = 0; i < length; i++)
|
||||
{
|
||||
crc ^= ptr[i];
|
||||
crc = (crc << 3) | (crc >> 29);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <QString>
|
||||
#include <QValidator>
|
||||
|
||||
|
@ -11,9 +13,10 @@ class UTF8CodePointCountValidator : public QValidator
|
|||
{
|
||||
Q_OBJECT
|
||||
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;
|
||||
|
||||
int m_max_count;
|
||||
private:
|
||||
std::size_t m_max_count;
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ bool TASCheckBox::GetValue() const
|
|||
if (checkState() == Qt::PartiallyChecked)
|
||||
{
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue