From e6b7e2d87ed2ad6be2078ba2bc7685f44314c80e Mon Sep 17 00:00:00 2001 From: Buckminsterfullerene02 Date: Wed, 31 Jul 2024 19:47:36 +0100 Subject: [PATCH 1/2] order attachments alphabetically to keep diffs happy --- UE4SS/src/SDKGenerator/UEHeaderGenerator.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/UE4SS/src/SDKGenerator/UEHeaderGenerator.cpp b/UE4SS/src/SDKGenerator/UEHeaderGenerator.cpp index c5ebb9e7a..f724a7dd0 100644 --- a/UE4SS/src/SDKGenerator/UEHeaderGenerator.cpp +++ b/UE4SS/src/SDKGenerator/UEHeaderGenerator.cpp @@ -814,8 +814,14 @@ namespace RC::UEGenerator } m_class_subobjects.clear(); + // Sort the attachments alphabetically by the property name + std::vector>> sorted_attachments(implementation_file.attachments.begin(), implementation_file.attachments.end()); + std::sort(sorted_attachments.begin(), sorted_attachments.end(), [](const auto& a, const auto& b) { + return a.first->GetName() < b.first->GetName(); + }); + // Generate component attachments - for (auto attachment : implementation_file.attachments) + for (auto attachment : sorted_attachments) { if (get<2>(attachment.second) == false) { From fbac9ebc03453817ef112c84b2236d419f4f0d17 Mon Sep 17 00:00:00 2001 From: Buckminsterfullerene02 Date: Wed, 31 Jul 2024 20:02:31 +0100 Subject: [PATCH 2/2] chore: changelog --- assets/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/Changelog.md b/assets/Changelog.md index f1f0bcdcd..9735f7a5c 100644 --- a/assets/Changelog.md +++ b/assets/Changelog.md @@ -94,6 +94,7 @@ Reduced the likelihood of a crash happening on shutdown when at least one watch Fixed constantly searching even if the search field is empty, and even if not on the tab ([UE4SS #475](https://github.com/UE4SS-RE/RE-UE4SS/pull/475)) ### UHT Dumper +Fix SetupAttachment implementations randomly changing order ([UE4SS #606](https://github.com/UE4SS-RE/RE-UE4SS/pull/606)) - Buckminsterfullerene ### Lua API Fixed FString use after free ([UE4SS #425](https://github.com/UE4SS-RE/RE-UE4SS/pull/425)) - localcc