global: Fix some warnings
This commit is contained in:
@ -94,7 +94,12 @@ void EmuThread::run() {
|
||||
emit DebugModeLeft();
|
||||
|
||||
exec_step = false;
|
||||
Core::System::GetInstance().SingleStep();
|
||||
const auto result = Core::System::GetInstance().SingleStep();
|
||||
if (result != Core::System::ResultStatus::Success) {
|
||||
this->SetRunning(false);
|
||||
emit ErrorThrown(result, Core::System::GetInstance().GetStatusDetails());
|
||||
}
|
||||
|
||||
emit DebugModeEntered();
|
||||
yieldCurrentThread();
|
||||
|
||||
|
@ -49,9 +49,10 @@ CheatDialog::~CheatDialog() = default;
|
||||
void CheatDialog::LoadCheats() {
|
||||
cheats = Core::System::GetInstance().CheatEngine().GetCheats();
|
||||
|
||||
ui->tableCheats->setRowCount(cheats.size());
|
||||
int cheat_count = static_cast<int>(cheats.size());
|
||||
ui->tableCheats->setRowCount(cheat_count);
|
||||
|
||||
for (size_t i = 0; i < cheats.size(); i++) {
|
||||
for (int i = 0; i < cheat_count; i++) {
|
||||
QCheckBox* enabled = new QCheckBox();
|
||||
enabled->setChecked(cheats[i]->IsEnabled());
|
||||
enabled->setStyleSheet(QStringLiteral("margin-left:7px;"));
|
||||
|
@ -944,14 +944,16 @@ void Config::SaveMultiplayerValues() {
|
||||
// Write ban list
|
||||
qt_config->beginWriteArray(QStringLiteral("username_ban_list"));
|
||||
for (std::size_t i = 0; i < UISettings::values.ban_list.first.size(); ++i) {
|
||||
qt_config->setArrayIndex(i);
|
||||
int index = static_cast<int>(i);
|
||||
qt_config->setArrayIndex(index);
|
||||
WriteSetting(QStringLiteral("username"),
|
||||
QString::fromStdString(UISettings::values.ban_list.first[i]));
|
||||
}
|
||||
qt_config->endArray();
|
||||
qt_config->beginWriteArray(QStringLiteral("ip_ban_list"));
|
||||
for (std::size_t i = 0; i < UISettings::values.ban_list.second.size(); ++i) {
|
||||
qt_config->setArrayIndex(i);
|
||||
int index = static_cast<int>(i);
|
||||
qt_config->setArrayIndex(index);
|
||||
WriteSetting(QStringLiteral("ip"),
|
||||
QString::fromStdString(UISettings::values.ban_list.second[i]));
|
||||
}
|
||||
|
@ -256,7 +256,8 @@ void ConfigureCamera::SetConfiguration() {
|
||||
int index = GetSelectedCameraIndex();
|
||||
for (std::size_t i = 0; i < Implementations.size(); i++) {
|
||||
if (Implementations[i] == camera_name[index]) {
|
||||
ui->image_source->setCurrentIndex(i);
|
||||
int current_index = static_cast<int>(i);
|
||||
ui->image_source->setCurrentIndex(current_index);
|
||||
}
|
||||
}
|
||||
if (camera_name[index] == "image") {
|
||||
|
@ -10,7 +10,7 @@ namespace Common {
|
||||
template <typename T>
|
||||
[[nodiscard]] constexpr T AlignUp(T value, std::size_t size) {
|
||||
static_assert(std::is_unsigned_v<T>, "T must be an unsigned value.");
|
||||
auto mod{value % size};
|
||||
auto mod = static_cast<T>(value % size);
|
||||
value -= mod;
|
||||
return static_cast<T>(mod == T{0} ? value : value + size);
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ void FlipRGBA8Texture(std::vector<u8>& tex, u64 width, u64 height) {
|
||||
ASSERT(tex.size() == width * height * 4);
|
||||
const u64 line_size = width * 4;
|
||||
for (u64 line = 0; line < height / 2; line++) {
|
||||
const u32 offset_1 = line * line_size;
|
||||
const u32 offset_2 = (height - line - 1) * line_size;
|
||||
const u64 offset_1 = line * line_size;
|
||||
const u64 offset_2 = (height - line - 1) * line_size;
|
||||
// Swap lines
|
||||
std::swap_ranges(tex.begin() + offset_1, tex.begin() + offset_1 + line_size,
|
||||
tex.begin() + offset_2);
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
|
||||
/// Feature support
|
||||
bool SupportsAnisotropicFiltering() const;
|
||||
u32 UniformMinAlignment() const { return device_limits.minUniformBufferOffsetAlignment; }
|
||||
u32 UniformMinAlignment() const { return static_cast<u32>(device_limits.minUniformBufferOffsetAlignment); }
|
||||
|
||||
private:
|
||||
bool CreateDevice(vk::SurfaceKHR surface, bool validation_enabled);
|
||||
|
@ -1633,7 +1633,7 @@ void RasterizerVulkan::UploadUniforms(bool accelerate_draw) {
|
||||
if (!sync_vs && !sync_fs)
|
||||
return;
|
||||
|
||||
std::size_t uniform_size = uniform_size_aligned_vs + uniform_size_aligned_fs;
|
||||
u32 uniform_size = uniform_size_aligned_vs + uniform_size_aligned_fs;
|
||||
|
||||
std::size_t used_bytes = 0;
|
||||
u8* uniforms = nullptr; u32 offset = 0; bool invalidate = false;
|
||||
|
Reference in New Issue
Block a user