mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-28 12:40:12 +00:00
misc: get rid of some compiler warnings
This commit is contained in:
parent
713c1a7a86
commit
0854ed2b51
@ -102,9 +102,10 @@ void auto_pause_settings_dialog::SaveEntries(void)
|
||||
|
||||
void auto_pause_settings_dialog::UpdateList(void)
|
||||
{
|
||||
const int entries_size = static_cast<int>(m_entries.size());
|
||||
pauseList->clearContents();
|
||||
pauseList->setRowCount(m_entries.size());
|
||||
for (size_t i = 0; i < m_entries.size(); ++i)
|
||||
pauseList->setRowCount(entries_size);
|
||||
for (int i = 0; i < entries_size; ++i)
|
||||
{
|
||||
QTableWidgetItem* callItem = new QTableWidgetItem;
|
||||
QTableWidgetItem* typeItem = new QTableWidgetItem;
|
||||
@ -163,7 +164,7 @@ void auto_pause_settings_dialog::ShowContextMenu(const QPoint &pos)
|
||||
connect(add, &QAction::triggered, [=]() {
|
||||
m_entries.emplace_back(0xFFFFFFFF);
|
||||
UpdateList();
|
||||
u32 idx = m_entries.size() - 1;
|
||||
int idx = static_cast<int>(m_entries.size()) - 1;
|
||||
pauseList->selectRow(idx);
|
||||
OnEntryConfig(idx, true);
|
||||
});
|
||||
|
@ -980,7 +980,7 @@ void game_list_frame::PopulateGameGrid(uint maxCols, const QSize& image_size, co
|
||||
}
|
||||
|
||||
// Get number of things that'll be in grid and precompute grid size.
|
||||
int entries = 0;
|
||||
uint entries = 0;
|
||||
for (const GUI_GameInfo& game : m_game_data)
|
||||
{
|
||||
if (qstr(game.info.category) == category::disc_Game || qstr(game.info.category) == category::hdd_Game)
|
||||
|
@ -900,7 +900,7 @@ void main_window::BootRecentAction(const QAction* act)
|
||||
LOG_ERROR(GENERAL, "Recent Game not valid, removed from Boot Recent list: %s", sstr(pth));
|
||||
|
||||
// refill menu with actions
|
||||
for (uint i = 0; i < m_recentGameActs.count(); i++)
|
||||
for (int i = 0; i < m_recentGameActs.count(); i++)
|
||||
{
|
||||
m_recentGameActs[i]->setShortcut(tr("Ctrl+%1").arg(i + 1));
|
||||
m_recentGameActs[i]->setToolTip(m_rg_entries.at(i).second);
|
||||
@ -1023,7 +1023,7 @@ void main_window::AddRecentAction(const q_string_pair& entry)
|
||||
}
|
||||
|
||||
// refill menu with actions
|
||||
for (uint i = 0; i < m_recentGameActs.count(); i++)
|
||||
for (int i = 0; i < m_recentGameActs.count(); i++)
|
||||
{
|
||||
m_recentGameActs[i]->setShortcut(tr("Ctrl+%1").arg(i+1));
|
||||
m_recentGameActs[i]->setToolTip(m_rg_entries.at(i).second);
|
||||
@ -1273,7 +1273,7 @@ void main_window::CreateConnects()
|
||||
|
||||
resizeIcons(idx);
|
||||
});
|
||||
connect(gameListFrame, &game_list_frame::RequestSaveSliderPos, [=](const bool& save){ m_save_slider_pos = true; });
|
||||
connect(gameListFrame, &game_list_frame::RequestSaveSliderPos, [=](const bool& save){ Q_UNUSED(save); m_save_slider_pos = true; });
|
||||
connect(gameListFrame, &game_list_frame::RequestListModeActSet, [=](const bool& isList)
|
||||
{
|
||||
isList ? ui->setlistModeListAct->trigger() : ui->setlistModeGridAct->trigger();
|
||||
@ -1402,7 +1402,7 @@ void main_window::ConfigureGuiFromSettings(bool configureAll)
|
||||
}
|
||||
m_recentGameActs.clear();
|
||||
// Fill the recent games menu
|
||||
for (uint i = 0; i < m_rg_entries.count(); i++)
|
||||
for (int i = 0; i < m_rg_entries.count(); i++)
|
||||
{
|
||||
// create new action
|
||||
QAction* act = CreateRecentAction(m_rg_entries[i], i + 1);
|
||||
|
@ -274,7 +274,7 @@ void pad_settings_dialog::Init(const u32 max_connect)
|
||||
memset(&m_info, 0, sizeof(PadInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
LoadSettings();
|
||||
m_info.now_connect = std::min(m_pads.size(), (size_t)max_connect);
|
||||
m_info.now_connect = std::min((u32)m_pads.size(), max_connect);
|
||||
}
|
||||
|
||||
void pad_settings_dialog::LoadSettings()
|
||||
|
@ -373,7 +373,7 @@ void rsx_debugger::wheelEvent(QWheelEvent* event)
|
||||
namespace
|
||||
{
|
||||
// Opens an image in a new window with original size
|
||||
void display_buffer(QWidget *parent, const QImage img)
|
||||
void display_buffer(const QImage& img)
|
||||
{
|
||||
if (img.isNull()) return;
|
||||
//QString title = qstr(fmt::format("Raw Image @ 0x%x", addr));
|
||||
@ -388,7 +388,7 @@ namespace
|
||||
}
|
||||
|
||||
// Draws a formatted and buffered <image> inside the Buffer Widget
|
||||
void Buffer::showImage(QImage image)
|
||||
void Buffer::showImage(const QImage& image)
|
||||
{
|
||||
if (image.isNull()) return;
|
||||
m_image = image;
|
||||
@ -425,7 +425,7 @@ void Buffer::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
|
||||
//if (0 <= m_id && m_id < 4) SHOW_BUFFER(m_id);
|
||||
|
||||
display_buffer(this, m_image);
|
||||
display_buffer(m_image);
|
||||
|
||||
if (m_isTex)
|
||||
{
|
||||
@ -495,6 +495,7 @@ namespace
|
||||
case rsx::surface_color_format::x1r5g5b5_o1r5g5b5:
|
||||
case rsx::surface_color_format::x1r5g5b5_z1r5g5b5:
|
||||
case rsx::surface_color_format::w32z32y32x32:
|
||||
default:
|
||||
fmt::throw_exception("Unsupported format for display" HERE);
|
||||
}
|
||||
}
|
||||
@ -532,15 +533,15 @@ void rsx_debugger::OnClickDrawCalls()
|
||||
m_buffer_colorD,
|
||||
};
|
||||
|
||||
size_t width = draw_call.state.surface_clip_width();
|
||||
size_t height = draw_call.state.surface_clip_height();
|
||||
u32 width = draw_call.state.surface_clip_width();
|
||||
u32 height = draw_call.state.surface_clip_height();
|
||||
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
{
|
||||
if (width && height && !draw_call.color_buffer[i].empty())
|
||||
{
|
||||
unsigned char* buffer = convert_to_QImage_buffer(draw_call.state.surface_color(), draw_call.color_buffer[i], width, height);
|
||||
buffers[i]->showImage(QImage(buffer, width, height, QImage::Format_RGB32));
|
||||
buffers[i]->showImage(QImage(buffer, (int)width, (int)height, QImage::Format_RGB32));
|
||||
}
|
||||
}
|
||||
|
||||
@ -581,7 +582,7 @@ void rsx_debugger::OnClickDrawCalls()
|
||||
}
|
||||
}
|
||||
}
|
||||
m_buffer_depth->showImage(QImage(buffer, width, height, QImage::Format_RGB32));
|
||||
m_buffer_depth->showImage(QImage(buffer, (int)width, (int)height, QImage::Format_RGB32));
|
||||
}
|
||||
}
|
||||
|
||||
@ -603,7 +604,7 @@ void rsx_debugger::OnClickDrawCalls()
|
||||
buffer[4 * col + 3 + width * row * 4] = 255;
|
||||
}
|
||||
}
|
||||
m_buffer_stencil->showImage(QImage(buffer, width, height, QImage::Format_RGB32));
|
||||
m_buffer_stencil->showImage(QImage(buffer, (int)width, (int)height, QImage::Format_RGB32));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
|
||||
Buffer(QWidget* parent, bool isTex, u32 id = 4)
|
||||
: QWidget(parent), m_isTex(isTex), m_id(id){};
|
||||
void showImage(QImage image = QImage());
|
||||
void showImage(const QImage& image = QImage());
|
||||
|
||||
private:
|
||||
void mouseDoubleClickEvent(QMouseEvent* event);
|
||||
|
@ -164,7 +164,7 @@ void save_data_list_dialog::OnEntryInfo()
|
||||
void save_data_list_dialog::UpdateList()
|
||||
{
|
||||
m_list->clearContents();
|
||||
m_list->setRowCount(m_save_entries.size());
|
||||
m_list->setRowCount((int)m_save_entries.size());
|
||||
gui_settings settings(this);
|
||||
|
||||
int row = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user