diff --git a/.gitignore b/.gitignore index 087f2968..9abc4aae 100644 --- a/.gitignore +++ b/.gitignore @@ -387,6 +387,8 @@ FodyWeavers.xsd !.vscode/launch.json !.vscode/extensions.json *.code-workspace +/CMakeUserPresets.json +/compile_commands.json # Local History for Visual Studio Code .history/ @@ -409,6 +411,6 @@ FodyWeavers.xsd /out/* /third-party/out/* /src/common/scm_rev.cpp - + # for macOS -**/.DS_Store \ No newline at end of file +**/.DS_Store diff --git a/src/core/libraries/np_trophy/trophy_ui.cpp b/src/core/libraries/np_trophy/trophy_ui.cpp index 6f60e8f9..8deaac25 100644 --- a/src/core/libraries/np_trophy/trophy_ui.cpp +++ b/src/core/libraries/np_trophy/trophy_ui.cpp @@ -71,4 +71,4 @@ void TrophyUI::Draw() { End(); } } -} \ No newline at end of file +} diff --git a/src/qt_gui/cheats_patches.cpp b/src/qt_gui/cheats_patches.cpp index a58106cb..aaa6b4f0 100644 --- a/src/qt_gui/cheats_patches.cpp +++ b/src/qt_gui/cheats_patches.cpp @@ -679,7 +679,7 @@ void CheatsPatches::downloadPatches(const QString repository, const bool showMes request.setRawHeader("Accept", "application/vnd.github.v3+json"); QNetworkReply* reply = manager->get(request); - connect(reply, &QNetworkReply::finished, [=]() { + connect(reply, &QNetworkReply::finished, [=, this]() { if (reply->error() == QNetworkReply::NoError) { QByteArray jsonData = reply->readAll(); reply->deleteLater(); @@ -712,7 +712,7 @@ void CheatsPatches::downloadPatches(const QString repository, const bool showMes QNetworkRequest fileRequest(downloadUrl); QNetworkReply* fileReply = manager->get(fileRequest); - connect(fileReply, &QNetworkReply::finished, [=]() { + connect(fileReply, &QNetworkReply::finished, [=, this]() { if (fileReply->error() == QNetworkReply::NoError) { QByteArray fileData = fileReply->readAll(); QFile localFile(dir.filePath(fileName)); diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index a2f7f28f..9300ca6e 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -20,6 +20,7 @@ #include #include #include +#include #endif #include "common/path_util.h" @@ -342,9 +343,9 @@ private: CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); // Create the ShellLink object - IShellLink* pShellLink = nullptr; + Microsoft::WRL::ComPtr pShellLink; HRESULT hres = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, - IID_IShellLink, (LPVOID*)&pShellLink); + IID_PPV_ARGS(&pShellLink)); if (SUCCEEDED(hres)) { // Defines the path to the program executable pShellLink->SetPath((LPCWSTR)exePath.utf16()); @@ -360,13 +361,11 @@ private: pShellLink->SetIconLocation((LPCWSTR)iconPath.utf16(), 0); // Save the shortcut - IPersistFile* pPersistFile = nullptr; - hres = pShellLink->QueryInterface(IID_IPersistFile, (LPVOID*)&pPersistFile); + Microsoft::WRL::ComPtr pPersistFile; + hres = pShellLink.As(&pPersistFile); if (SUCCEEDED(hres)) { hres = pPersistFile->Save((LPCWSTR)linkPath.utf16(), TRUE); - pPersistFile->Release(); } - pShellLink->Release(); } CoUninitialize(); diff --git a/src/video_core/buffer_cache/buffer.cpp b/src/video_core/buffer_cache/buffer.cpp index 9fc97224..f8afd699 100644 --- a/src/video_core/buffer_cache/buffer.cpp +++ b/src/video_core/buffer_cache/buffer.cpp @@ -9,10 +9,7 @@ #include "video_core/renderer_vulkan/vk_platform.h" #include "video_core/renderer_vulkan/vk_scheduler.h" -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnullability-completeness" #include -#pragma GCC diagnostic pop namespace VideoCore { diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 102bb6a2..9fa64d5b 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -12,10 +12,7 @@ #include "video_core/renderer_vulkan/vk_rasterizer.h" #include "video_core/texture_cache/image.h" -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnullability-completeness" #include -#pragma GCC diagnostic pop namespace Vulkan { diff --git a/src/video_core/renderer_vulkan/vk_common.cpp b/src/video_core/renderer_vulkan/vk_common.cpp index 0823fd23..b1956780 100644 --- a/src/video_core/renderer_vulkan/vk_common.cpp +++ b/src/video_core/renderer_vulkan/vk_common.cpp @@ -5,10 +5,10 @@ // Implement vma functions #define VMA_IMPLEMENTATION -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnullability-completeness" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnullability-completeness" #include -#pragma GCC diagnostic pop +#pragma clang diagnostic pop // Store the dispatch loader here VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE diff --git a/src/video_core/renderer_vulkan/vk_instance.cpp b/src/video_core/renderer_vulkan/vk_instance.cpp index 76d7aea5..c09414a1 100644 --- a/src/video_core/renderer_vulkan/vk_instance.cpp +++ b/src/video_core/renderer_vulkan/vk_instance.cpp @@ -14,10 +14,7 @@ #include "video_core/renderer_vulkan/vk_instance.h" #include "video_core/renderer_vulkan/vk_platform.h" -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnullability-completeness" #include -#pragma GCC diagnostic pop namespace Vulkan { diff --git a/src/video_core/texture_cache/image.cpp b/src/video_core/texture_cache/image.cpp index c8c7ea18..bea2ce4f 100644 --- a/src/video_core/texture_cache/image.cpp +++ b/src/video_core/texture_cache/image.cpp @@ -8,10 +8,7 @@ #include "video_core/renderer_vulkan/vk_scheduler.h" #include "video_core/texture_cache/image.h" -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnullability-completeness" #include -#pragma GCC diagnostic pop namespace VideoCore { diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index 429afcae..40a1825a 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -15,10 +15,7 @@ #include #include -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnullability-completeness" #include -#pragma GCC diagnostic pop namespace VideoCore {