handle some warnings

This commit is contained in:
Megamouse 2018-01-12 12:33:37 +01:00 committed by Ivan
parent ef6a36241e
commit 2053de0885
10 changed files with 13 additions and 13 deletions

View file

@ -121,7 +121,7 @@ void XAudio2Thread::xa27_open()
return;
}
s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0 : 4.0);
s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0f : 4.0f);
}
void XAudio2Thread::xa27_add(const void* src, int size)

View file

@ -152,7 +152,7 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
if (fs::is_file(base_dir + entry.name + "/ICON0.PNG"))
{
fs::file icon = fs::file(base_dir + entry.name + "/ICON0.PNG");
u32 iconSize = icon.size();
u64 iconSize = icon.size();
std::vector<uchar> iconData;
icon.read(iconData, iconSize);
save_entry2.iconBuf = iconData;

View file

@ -521,7 +521,7 @@ error_code sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, vm::pt
// Get icon for the notification.
std::string trophyIconPath = "/dev_hdd0/home/00000001/trophy/" + ctxt->trp_name + "/TROP" + padding + std::to_string(trophyId) + ".PNG";
fs::file trophyIconFile = fs::file(vfs::get(trophyIconPath));
u32 iconSize = trophyIconFile.size();
size_t iconSize = trophyIconFile.size();
std::vector<uchar> trophyIconData;
trophyIconFile.read(trophyIconData, iconSize);

View file

@ -112,7 +112,7 @@ int main(int argc, char** argv)
{
argv.emplace_back();
for (std::size_t i = 1; i < args.length(); i++)
for (int i = 1; i < args.length(); i++)
{
argv.emplace_back(args[i].toStdString());
}

View file

@ -306,7 +306,7 @@ void emu_settings::EnhanceSlider(QSlider* slider, SettingsType type, bool is_ran
connect(slider, &QSlider::valueChanged, [=](int value)
{
SetSetting(type, sstr(slider->value()));
SetSetting(type, sstr(value));
});
}

View file

@ -1128,10 +1128,10 @@ int game_list_frame::PopulateGameList()
return result;
}
void game_list_frame::PopulateGameGrid(uint maxCols, const QSize& image_size, const QColor& image_color)
void game_list_frame::PopulateGameGrid(int maxCols, const QSize& image_size, const QColor& image_color)
{
uint r = 0;
uint c = 0;
int r = 0;
int c = 0;
std::string selected_item = CurrentSelectionIconPath();
@ -1200,7 +1200,7 @@ void game_list_frame::PopulateGameGrid(uint maxCols, const QSize& image_size, co
if (c != 0)
{ // if left over games exist -- if empty entries exist
for (uint col = c; col < maxCols; ++col)
for (int col = c; col < maxCols; ++col)
{
QTableWidgetItem* emptyItem = new QTableWidgetItem();
emptyItem->setFlags(Qt::NoItemFlags);

View file

@ -241,7 +241,7 @@ protected:
private:
QPixmap PaintedPixmap(const QImage& img, bool paintConfigIcon = false);
bool Boot(const GameInfo& info);
void PopulateGameGrid(uint maxCols, const QSize& image_size, const QColor& image_color);
void PopulateGameGrid(int maxCols, const QSize& image_size, const QColor& image_color);
void FilterData();
void SortGameList();

View file

@ -84,7 +84,7 @@ save_data_list_dialog::save_data_list_dialog(const std::vector<SaveDataEntry>& e
{
m_entry = cr;
UpdateSelectionLabel();
Q_UNUSED(cr); Q_UNUSED(pr); Q_UNUSED(pc);
Q_UNUSED(cc); Q_UNUSED(pr); Q_UNUSED(pc);
});
connect(m_list->horizontalHeader(), &QHeaderView::sectionClicked, this, &save_data_list_dialog::OnSort);

View file

@ -269,7 +269,7 @@ bool trophy_manager_dialog::LoadTrophyFolderToDB(const std::string& trop_name)
return false;
}
for (int trophy_id = 0; trophy_id < game_trophy_data->trop_usr->GetTrophiesCount(); ++trophy_id)
for (u32 trophy_id = 0; trophy_id < game_trophy_data->trop_usr->GetTrophiesCount(); ++trophy_id)
{
// Figure out how many zeros are needed for padding. (either 0, 1, or 2)
QString padding = "";

View file

@ -6,7 +6,7 @@
static const int TROPHY_TIMEOUT_MS = 7500;
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
constexpr auto qstr = QString::fromStdString;
trophy_notification_frame::trophy_notification_frame(const std::vector<uchar>& imgBuffer, const SceNpTrophyDetails& trophy, int height) : QWidget()
{