Skip to content

Commit

Permalink
Changed casing of static variables to be aligned with the rest of our…
Browse files Browse the repository at this point in the history
… code style
  • Loading branch information
UE4SS authored and localcc committed Sep 26, 2023
1 parent 8be9b07 commit b623094
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion UVTD/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Add the class or struct name to the following variables and function implementat

static std::vector<ObjectItem> s_object_items

static std::unordered_set<File::StringType> valid_udt_names
static std::unordered_set<File::StringType> s_valid_udt_names

auto static is_valid_type_to_dump(File::StringType type_name) -> bool

Expand Down
26 changes: 4 additions & 22 deletions UVTD/include/UVTD/Helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,33 +113,15 @@ namespace RC::UVTD
}},
};

static std::unordered_set<File::StringType> NonCasePreservingVariants{
static std::unordered_set<File::StringType> s_non_case_preserving_variants{
{STR("4_27")},
};

static std::unordered_set<File::StringType> CasePreservingVariants{
static std::unordered_set<File::StringType> s_case_preserving_variants{
{STR("4_27_CasePreserving")},
};

static inline std::vector<File::StringType> UPrefixToFPrefix{
STR("UProperty"),
STR("UMulticastDelegateProperty"),
STR("UObjectPropertyBase"),
STR("UStructProperty"),
STR("UArrayProperty"),
STR("UMapProperty"),
STR("UBoolProperty"),
STR("UByteProperty"),
STR("UNumericProperty"),
STR("UEnumProperty"),
STR("UClassProperty"),
STR("USoftClassProperty"),
STR("UDelegateProperty"),
STR("UInterfaceProperty"),
STR("USetProperty"),
};

static inline std::unordered_set<File::StringType> valid_udt_names{STR("UScriptStruct::ICppStructOps"),
static inline std::unordered_set<File::StringType> s_valid_udt_names{STR("UScriptStruct::ICppStructOps"),
STR("UObjectBase"),
STR("UObjectBaseUtility"),
STR("UObject"),
Expand Down Expand Up @@ -197,7 +179,7 @@ namespace RC::UVTD
STR("USetProperty"),
STR("FFrame")};

static inline std::vector<File::StringType> uprefix_to_fprefix{
static inline std::vector<File::StringType> s_uprefix_to_fprefix{
STR("UProperty"),
STR("UMulticastDelegateProperty"),
STR("UObjectPropertyBase"),
Expand Down
2 changes: 1 addition & 1 deletion UVTD/src/Helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace RC::UVTD

auto change_prefix(File::StringType input, bool is_425_plus) -> std::optional<File::StringType>
{
for (const auto& prefixed : uprefix_to_fprefix)
for (const auto& prefixed : s_uprefix_to_fprefix)
{
for (size_t index = input.find(prefixed); index != input.npos; index = input.find(prefixed))
{
Expand Down
2 changes: 1 addition & 1 deletion UVTD/src/Symbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ namespace RC::UVTD
{
name = STR("TMap<") + parsed.template_args[0] + STR(", ") + parsed.template_args[1] + STR(">");
}
if (check_valid && !valid_udt_names.contains(name)) return STR("void");
if (check_valid && !s_valid_udt_names.contains(name)) return STR("void");
return name;
}
case PDB::CodeView::TPI::TypeRecordKind::LF_ENUM:
Expand Down
4 changes: 2 additions & 2 deletions UVTD/src/UnrealVirtualGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace RC::UVTD
return File::StringType{string};
});

bool is_case_preserving_pdb = !(CasePreservingVariants.find(pdb_name) == CasePreservingVariants.end());
bool is_non_case_preserving_pdb = !(NonCasePreservingVariants.find(pdb_name) == NonCasePreservingVariants.end());
bool is_case_preserving_pdb = !(s_case_preserving_variants.find(pdb_name) == s_case_preserving_variants.end());
bool is_non_case_preserving_pdb = !(s_non_case_preserving_variants.find(pdb_name) == s_non_case_preserving_variants.end());

if (!is_case_preserving_pdb)
{
Expand Down

0 comments on commit b623094

Please sign in to comment.