Skip to content

Commit

Permalink
Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Aug 22, 2024
1 parent 2a17076 commit c6b0883
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Source/UEST/Private/UESTGameInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
// UGameInstance::WorldContext is not public, and neither InitializeStandalone nor InitializeForPlayInEditor is suitable for us.
// So we use this template hack to access WorldContext field.
// Source: https://ledas.com/post/857-how-to-hack-c-with-templates-and-friends/
template<typename T, auto T::* Field, typename RetVal>
struct Stealer {
static friend RetVal& FieldGetter(T& Object) {
template<typename T, auto T::*Field, typename RetVal>
struct Stealer
{
static friend RetVal& FieldGetter(T& Object)
{
return Object.*Field;
}
};
Expand Down

0 comments on commit c6b0883

Please sign in to comment.