From be585c9f6844e875e3e2a8702b68833e1a44f501 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 23 Sep 2020 12:18:01 +1000 Subject: [PATCH] Qt: Fix compilation with Qt 5.11 --- src/duckstation-qt/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 94d71d2e8..fcfac49b4 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -831,7 +831,7 @@ void MainWindow::saveStateToConfig() const QByteArray geometry = saveGeometry(); const QByteArray geometry_b64 = geometry.toBase64(); const std::string old_geometry_b64 = m_host_interface->GetStringSettingValue("UI", "MainWindowGeometry"); - if (geometry_b64.compare(old_geometry_b64.c_str()) != 0) + if (old_geometry_b64 != geometry_b64.constData()) m_host_interface->SetStringSettingValue("UI", "MainWindowGeometry", geometry_b64.constData()); } @@ -839,7 +839,7 @@ void MainWindow::saveStateToConfig() const QByteArray state = saveState(); const QByteArray state_b64 = state.toBase64(); const std::string old_state_b64 = m_host_interface->GetStringSettingValue("UI", "MainWindowState"); - if (state_b64.compare(old_state_b64.c_str()) != 0) + if (old_state_b64 != state_b64.constData()) m_host_interface->SetStringSettingValue("UI", "MainWindowState", state_b64.constData()); } }