Silence some -Wsign-compare warnings.
This commit is contained in:
parent
8af5753da5
commit
f15c142c5e
@ -26,7 +26,7 @@ static QVariant GetDataForColumn(int col, const AggregatedDuration& duration)
|
|||||||
static const TimingCategoryInfo* GetCategoryInfo(int id)
|
static const TimingCategoryInfo* GetCategoryInfo(int id)
|
||||||
{
|
{
|
||||||
const auto& categories = GetProfilingManager().GetTimingCategoriesInfo();
|
const auto& categories = GetProfilingManager().GetTimingCategoriesInfo();
|
||||||
if (id >= categories.size()) {
|
if ((size_t)id >= categories.size()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
} else {
|
} else {
|
||||||
return &categories[id];
|
return &categories[id];
|
||||||
@ -98,7 +98,7 @@ QVariant ProfilerModel::data(const QModelIndex& index, int role) const
|
|||||||
const TimingCategoryInfo* info = GetCategoryInfo(index.row() - 2);
|
const TimingCategoryInfo* info = GetCategoryInfo(index.row() - 2);
|
||||||
return info != nullptr ? QString(info->name) : QVariant();
|
return info != nullptr ? QString(info->name) : QVariant();
|
||||||
} else {
|
} else {
|
||||||
if (index.row() - 2 < results.time_per_category.size()) {
|
if (index.row() - 2 < (int)results.time_per_category.size()) {
|
||||||
return GetDataForColumn(index.column(), results.time_per_category[index.row() - 2]);
|
return GetDataForColumn(index.column(), results.time_per_category[index.row() - 2]);
|
||||||
} else {
|
} else {
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -342,10 +342,10 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0,
|
|||||||
|
|
||||||
case Regs::TextureConfig::MirroredRepeat:
|
case Regs::TextureConfig::MirroredRepeat:
|
||||||
{
|
{
|
||||||
int coord = (int)((unsigned)val % (2 * size));
|
unsigned int coord = ((unsigned)val % (2 * size));
|
||||||
if (coord >= size)
|
if (coord >= size)
|
||||||
coord = 2 * size - 1 - coord;
|
coord = 2 * size - 1 - coord;
|
||||||
return coord;
|
return (int)coord;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user