Skip to content

Commit

Permalink
Fix template functions; add missing dll declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Razdvizh committed Nov 1, 2024
1 parent 9e4080e commit c584304
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Source/VisualU/Public/Scenario.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class USoundCue;
* Describes UVisualSprite for UVisualRenderer.
*/
USTRUCT(BlueprintType)
struct FSprite
struct VISUALU_API FSprite
{
GENERATED_BODY()

Expand Down Expand Up @@ -112,7 +112,7 @@ struct FSprite
* Describes what background to display and what effect to use for transition.
*/
USTRUCT(BlueprintType)
struct FBackground
struct VISUALU_API FBackground
{
GENERATED_BODY()

Expand Down Expand Up @@ -182,7 +182,7 @@ ENUM_CLASS_FLAGS(EScenarioMetaFlags)
* Data that describes FScenario.
*/
USTRUCT(BlueprintType)
struct FVisualScenarioInfo : public FVisualInfo
struct VISUALU_API FVisualScenarioInfo : public FVisualInfo
{
GENERATED_BODY()

Expand Down
2 changes: 1 addition & 1 deletion Source/VisualU/Public/VisualTemplates.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ concept HasMemberOfType = HasMemberOfTypeImpl<T, U>::value;
* Assigns values, in order, to the member variables of the object.
*/
template<typename T, typename... V>
VISUALU_API inline void UpdateMembers(T* Obj, V T::*... Pointers, const V&... Values)
inline void UpdateMembers(T* Obj, V T::*... Pointers, const V&... Values)
{
((Obj->*Pointers = Values), ...);
}
5 changes: 3 additions & 2 deletions Source/VisualU/Public/VisualVersioningSubsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "CoreMinimal.h"
#include "Subsystems/LocalPlayerSubsystem.h"
#include "Scenario.h"
#include "InfoAssignable.h"
#include "Engine/DataTable.h"
#include "VisualController.h"
#include "VisualTemplates.h"
Expand Down Expand Up @@ -72,7 +73,7 @@ class VISUALU_API UVisualVersioningSubsystem : public ULocalPlayerSubsystem
FScenario* Scene = GetSceneChecked(DataTable, SceneName);
FScenarioId Id{ Scene->GetOwner(), Scene->GetIndex() };
Versions.Add(Id, Scene->Info);
UpdateMembers(Scene->Info, Members, Values);
UpdateMembers<T, V...>(&Scene->Info, Members..., Values...);
}

/**
Expand All @@ -86,7 +87,7 @@ class VISUALU_API UVisualVersioningSubsystem : public ULocalPlayerSubsystem
check(Scene);
FScenarioId Id{ Scene->GetOwner(), Scene->GetIndex() };
Versions.Add(Id, Scene->Info);
UpdateMembers(Scene->Info, Members, Values);
UpdateMembers<T, V...>(&Scene->Info, Members..., Values...);
}

/**
Expand Down

0 comments on commit c584304

Please sign in to comment.