From a950cda919cd5892a1511074c45c2311130a08dd Mon Sep 17 00:00:00 2001 From: boludoz Date: Fri, 6 Oct 2023 00:07:35 -0300 Subject: [PATCH] Clang-format fixed --- src/common/fs/fs_util.cpp | 6 ++++-- src/yuzu/main.cpp | 3 ++- src/yuzu/util/util.cpp | 7 +++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/common/fs/fs_util.cpp b/src/common/fs/fs_util.cpp index cfb625d5aa..b3ea4a82cc 100644 --- a/src/common/fs/fs_util.cpp +++ b/src/common/fs/fs_util.cpp @@ -35,9 +35,11 @@ std::u8string_view BufferToU8StringView(std::span buffer) { std::wstring ToWString(std::u8string_view utf8_string) { #ifdef _WIN32 - int size_needed = MultiByteToWideChar(CP_UTF8, 0, reinterpret_cast(utf8_string.data()), -1, NULL, 0); + int size_needed = MultiByteToWideChar( + CP_UTF8, 0, reinterpret_cast(utf8_string.data()), -1, NULL, 0); std::wstring wstr(size_needed, 0); - MultiByteToWideChar(CP_UTF8, 0, reinterpret_cast(utf8_string.data()), -1, &wstr[0], size_needed); + MultiByteToWideChar(CP_UTF8, 0, reinterpret_cast(utf8_string.data()), -1, &wstr[0], + size_needed); return wstr; #else return std::wstring{utf8_string.begin(), utf8_string.end()}; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 386816ba74..5488e753a8 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3137,7 +3137,8 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const QString& game_p // Save the QPixmap as an .ico file QList pixmaps; pixmaps.append(pixmap); - if (!savePixmapsToICO(pixmaps, QString::fromStdWString(Common::FS::ToWString(icon_path.u8string())))) { + if (!savePixmapsToICO(pixmaps, + QString::fromStdWString(Common::FS::ToWString(icon_path.u8string())))) { LOG_ERROR(Frontend, "Could not write icon as ICO to file"); } else { LOG_INFO(Frontend, "Wrote an icon to {}", icon_path.string()); diff --git a/src/yuzu/util/util.cpp b/src/yuzu/util/util.cpp index 9c40532852..6d257d4c21 100644 --- a/src/yuzu/util/util.cpp +++ b/src/yuzu/util/util.cpp @@ -5,14 +5,14 @@ #include #include #include -#include #include #include -#include #include -#include #include +#include +#include #include +#include #include "yuzu/util/util.h" @@ -77,7 +77,6 @@ bool savePixmapsToICO(const QList& pixmaps, const QString& path) { const auto& pixmap = pixmaps[ii]; pixmap.save(&temp, "PNG"); - temp.close(); images_size.push_back(QFileInfo(temp).size());