handle some more warnings

This commit is contained in:
Megamouse 2019-05-24 23:54:14 +02:00
parent 8ebe02ce32
commit f48589005d
9 changed files with 24 additions and 35 deletions

View File

@ -255,8 +255,8 @@ public:
atomic_t<CellOskDialogContinuousMode> osk_continuous_mode{ CellOskDialogContinuousMode::CELL_OSKDIALOG_CONTINUOUS_MODE_NONE };
atomic_t<CellOskDialogInputFieldResult> osk_input_result{ CellOskDialogInputFieldResult::CELL_OSKDIALOG_INPUT_FIELD_RESULT_OK };
char16_t osk_text[CELL_OSKDIALOG_STRING_SIZE];
char16_t osk_text_old[CELL_OSKDIALOG_STRING_SIZE];
char16_t osk_text[CELL_OSKDIALOG_STRING_SIZE]{};
char16_t osk_text_old[CELL_OSKDIALOG_STRING_SIZE]{};
vm::ptr<cellOskDialogConfirmWordFilterCallback> osk_confirm_callback{ vm::null };
};

View File

@ -297,7 +297,7 @@ void mm_joystick_handler::GetNextButtonPress(const std::string& padId, const std
if (cur_pad != padId)
{
cur_pad == padId;
cur_pad = padId;
id = GetIDByName(padId);
if (id < 0)
{

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "stdafx.h"
@ -52,7 +52,7 @@ private:
void InitializeCallbacks();
void InitializeConnects();
main_window* RPCS3MainWin;
main_window* RPCS3MainWin = nullptr;
std::shared_ptr<gui_settings> guiSettings;
std::shared_ptr<emu_settings> emuSettings;

View File

@ -150,7 +150,7 @@ public:
QString name;
QString old_adapter;
QStringList adapters;
SettingsType type;
SettingsType type = VulkanAdapter;
bool supported = true;
bool has_adapters = true;

View File

@ -719,7 +719,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
{
if (RemoveCustomConfiguration(currGame.serial, gameinfo, true))
{
ShowCustomConfigIcon(item, config::type::emu);
ShowCustomConfigIcon(item);
}
});
}
@ -730,7 +730,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
{
if (RemoveCustomPadConfiguration(currGame.serial, gameinfo, true))
{
ShowCustomConfigIcon(item, config::type::pad);
ShowCustomConfigIcon(item);
}
});
}
@ -795,7 +795,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
if (dlg.exec() == QDialog::Accepted && !gameinfo->hasCustomConfig)
{
gameinfo->hasCustomConfig = true;
ShowCustomConfigIcon(item, config::type::emu);
ShowCustomConfigIcon(item);
}
});
connect(pad_configure, &QAction::triggered, [=]
@ -816,7 +816,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
if (dlg.exec() == QDialog::Accepted && !gameinfo->hasCustomPadConfig)
{
gameinfo->hasCustomPadConfig = true;
ShowCustomConfigIcon(item, config::type::pad);
ShowCustomConfigIcon(item);
}
if (!Emu.IsStopped())
{
@ -1488,7 +1488,7 @@ QPixmap game_list_frame::PaintedPixmap(const QImage& img, bool paint_config_icon
return QPixmap::fromImage(image.scaled(m_Icon_Size * device_pixel_ratio, Qt::KeepAspectRatio, Qt::TransformationMode::SmoothTransformation));
}
void game_list_frame::ShowCustomConfigIcon(QTableWidgetItem* item, config::type type)
void game_list_frame::ShowCustomConfigIcon(QTableWidgetItem* item)
{
auto game = GetGameInfoFromItem(item);
if (game == nullptr)

View File

@ -31,15 +31,6 @@ enum Category
Others,
};
namespace config
{
enum class type
{
emu,
pad
};
}
namespace category // (see PARAM.SFO in psdevwiki.com) TODO: Disc Categories
{
// PS3 bootable
@ -247,7 +238,7 @@ protected:
private:
QPixmap PaintedPixmap(const QImage& img, bool paint_config_icon = false, bool paint_pad_config_icon = false, const QColor& color = QColor());
QColor getGridCompatibilityColor(const QString& string);
void ShowCustomConfigIcon(QTableWidgetItem* item, config::type type);
void ShowCustomConfigIcon(QTableWidgetItem* item);
void PopulateGameGrid(int maxCols, const QSize& image_size, const QColor& image_color);
bool IsEntryVisible(const game_info& game);
void SortGameList();

View File

@ -180,7 +180,7 @@ void osk_dialog_frame::Create(const std::string& title, const std::u16string& me
void osk_dialog_frame::SetOskText(const QString& text)
{
std::memcpy(osk_text, reinterpret_cast<const char16_t*>(text.constData()), size_t(text.size() + 1) * sizeof(char16_t));
std::memcpy(osk_text, reinterpret_cast<const char16_t*>(text.constData()), ((size_t)text.size() + 1) * sizeof(char16_t));
}
void osk_dialog_frame::Close(bool accepted)

View File

@ -224,7 +224,7 @@ void save_manager_dialog::OnSort(int logicalIndex)
}
/**
*Display info dialog directly. Copied from save_data_list_dialog
* Display info dialog directly. Copied from save_data_list_dialog
*/
void save_manager_dialog::OnEntryInfo()
{
@ -238,7 +238,7 @@ void save_manager_dialog::OnEntryInfo()
}
}
//Remove a save file, need to be confirmed.
// Remove a save file, need to be confirmed.
void save_manager_dialog::OnEntryRemove()
{
int idx = m_list->currentRow();
@ -279,7 +279,7 @@ void save_manager_dialog::OnEntriesRemove()
}
}
//Pop-up a small context-menu, being a replacement for save_data_manage_dialog
// Pop-up a small context-menu, being a replacement for save_data_manage_dialog
void save_manager_dialog::ShowContextMenu(const QPoint &pos)
{
bool selectedItems = m_list->selectionModel()->selectedRows().size() > 1;
@ -300,14 +300,14 @@ void save_manager_dialog::ShowContextMenu(const QPoint &pos)
QAction* infoAct = new QAction(tr("&Info"), this);
QAction* showDirAct = new QAction(tr("&Open Save Directory"), this);
//This is also a stub for the sort setting. Ids are set accordingly to their sort-type integer.
// This is also a stub for the sort setting. Ids are set accordingly to their sort-type integer.
// TODO: add more sorting types.
m_sort_options = new QMenu(tr("&Sort By"));
m_sort_options->addAction(titleAct);
m_sort_options->addAction(subtitleAct);
m_sort_options->addAction(saveIDAct);
QMenu* sort_options = new QMenu(tr("&Sort By"), this);
sort_options->addAction(titleAct);
sort_options->addAction(subtitleAct);
sort_options->addAction(saveIDAct);
menu->addMenu(m_sort_options);
menu->addMenu(sort_options);
menu->addSeparator();
menu->addAction(removeAct);
menu->addAction(infoAct);

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "stdafx.h"
#include "Emu/Memory/vm.h"
@ -32,14 +32,12 @@ private:
void closeEvent(QCloseEvent* event) override;
QTableWidget* m_list;
QTableWidget* m_list = nullptr;
std::string m_dir;
std::vector<SaveDataEntry> m_save_entries;
std::shared_ptr<gui_settings> m_gui_settings;
QMenu* m_sort_options;
int m_sort_column;
bool m_sort_ascending;
};