citra-emu
/
citra-canary
Archived
1
0
Fork 0

Merge pull request #5190 from Subv/warnings

Warnings: Fixed a few warnings from various places
This commit is contained in:
Pengfei Zhu 2020-04-12 12:44:32 +08:00 committed by GitHub
commit a1be6a4ffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 6 deletions

View File

@ -104,8 +104,8 @@ void EmuThread::run() {
} }
OpenGLWindow::OpenGLWindow(QWindow* parent, QWidget* event_handler, QOpenGLContext* shared_context) OpenGLWindow::OpenGLWindow(QWindow* parent, QWidget* event_handler, QOpenGLContext* shared_context)
: QWindow(parent), event_handler(event_handler), : QWindow(parent), context(new QOpenGLContext(shared_context->parent())),
context(new QOpenGLContext(shared_context->parent())) { event_handler(event_handler) {
// disable vsync for any shared contexts // disable vsync for any shared contexts
auto format = shared_context->format(); auto format = shared_context->format();

View File

@ -30,7 +30,7 @@ CalibrationConfigurationDialog::CalibrationConfigurationDialog(QWidget* parent,
setLayout(layout); setLayout(layout);
using namespace InputCommon::CemuhookUDP; using namespace InputCommon::CemuhookUDP;
job = std::move(std::make_unique<CalibrationConfigurationJob>( job = std::make_unique<CalibrationConfigurationJob>(
host, port, pad_index, client_id, host, port, pad_index, client_id,
[this](CalibrationConfigurationJob::Status status) { [this](CalibrationConfigurationJob::Status status) {
QString text; QString text;
@ -56,7 +56,7 @@ CalibrationConfigurationDialog::CalibrationConfigurationDialog(QWidget* parent,
min_y = min_y_; min_y = min_y_;
max_x = max_x_; max_x = max_x_;
max_y = max_y_; max_y = max_y_;
})); });
} }
CalibrationConfigurationDialog::~CalibrationConfigurationDialog() = default; CalibrationConfigurationDialog::~CalibrationConfigurationDialog() = default;

View File

@ -1232,7 +1232,7 @@ void GMainWindow::OnGameListDumpRomFS(QString game_path, u64 program_id) {
using FutureWatcher = QFutureWatcher<std::pair<Loader::ResultStatus, Loader::ResultStatus>>; using FutureWatcher = QFutureWatcher<std::pair<Loader::ResultStatus, Loader::ResultStatus>>;
auto* future_watcher = new FutureWatcher(this); auto* future_watcher = new FutureWatcher(this);
connect(future_watcher, &FutureWatcher::finished, connect(future_watcher, &FutureWatcher::finished,
[this, program_id, dialog, base_path, update_path, future_watcher] { [this, dialog, base_path, update_path, future_watcher] {
dialog->hide(); dialog->hide();
const auto& [base, update] = future_watcher->result(); const auto& [base, update] = future_watcher->result();
if (base != Loader::ResultStatus::Success) { if (base != Loader::ResultStatus::Success) {

View File

@ -194,6 +194,7 @@ void Thread::ResumeFromWait() {
case ThreadStatus::WaitArb: case ThreadStatus::WaitArb:
case ThreadStatus::WaitSleep: case ThreadStatus::WaitSleep:
case ThreadStatus::WaitIPC: case ThreadStatus::WaitIPC:
case ThreadStatus::Dormant:
break; break;
case ThreadStatus::Ready: case ThreadStatus::Ready:

View File

@ -53,7 +53,7 @@ public:
mutable std::mutex ban_list_mutex; ///< Mutex for the ban lists mutable std::mutex ban_list_mutex; ///< Mutex for the ban lists
RoomImpl() RoomImpl()
: random_gen(std::random_device()()), NintendoOUI{0x00, 0x1F, 0x32, 0x00, 0x00, 0x00} {} : NintendoOUI{0x00, 0x1F, 0x32, 0x00, 0x00, 0x00}, random_gen(std::random_device()()) {}
/// Thread that receives and dispatches network packets /// Thread that receives and dispatches network packets
std::unique_ptr<std::thread> room_thread; std::unique_ptr<std::thread> room_thread;

View File

@ -242,6 +242,13 @@ void RoomMember::RoomMemberImpl::MemberLoop() {
SetError(Error::LostConnection); SetError(Error::LostConnection);
} }
break; break;
case ENET_EVENT_TYPE_NONE:
break;
case ENET_EVENT_TYPE_CONNECT:
// The ENET_EVENT_TYPE_CONNECT event can not possibly happen here because we're
// already connected
ASSERT_MSG(false, "Received unexpected connect event while already connected");
break;
} }
} }
{ {