Skip to content

Commit

Permalink
release 1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jagt committed Dec 25, 2024
1 parent 283e1f9 commit 77b5f29
Show file tree
Hide file tree
Showing 27 changed files with 128 additions and 64 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once

#define DATA_CONFIG_CORE_VERSION "1.7.2"
#define DATA_CONFIG_CORE_VERSION_NUMBER 10702
#define DATA_CONFIG_CORE_VERSION "1.7.3"
#define DATA_CONFIG_CORE_VERSION_NUMBER 10703
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcTestSerDeEditor.generated.h"

UCLASS()
Expand All @@ -12,13 +13,14 @@ class DATACONFIGEDITOREXTRA_API UDcEditorExtraNativeDataAsset : public UDataAsse
public:

UPROPERTY() FString StrField;
UPROPERTY() int IntField;
UPROPERTY() int IntField = 0;
};

USTRUCT()
struct FDcEditorExtraTestObjectRefs1
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcEditorExtraTestObjectRefs1)

UPROPERTY() UObject* ObjField1;
UPROPERTY() UObject* ObjField2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "DataConfig/Deserialize/DcDeserializeTypes.h"
#include "DataConfig/Serialize/DcSerializeTypes.h"
#include "Engine/DataAsset.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcSerDeBlueprint.generated.h"

/// Blueprint SerDe, including:
Expand Down Expand Up @@ -64,6 +65,7 @@ USTRUCT()
struct DATACONFIGENGINEEXTRA_API FDcEngineExtraTestStructWithBPInstance
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcEngineExtraTestStructWithBPInstance)

UPROPERTY() UDcTestBPClassBase* InstanceField1;
UPROPERTY() UDcTestBPClassBase* InstanceField2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#pragma once

#include "CoreMinimal.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcBenchmarkFixture1.generated.h"

USTRUCT()
struct FDcVector2D
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcVector2D)

UPROPERTY() float X;
UPROPERTY() float Y;
Expand Down Expand Up @@ -75,7 +77,7 @@ struct FDcCorpusEntry
UPROPERTY() TArray<FDcCorpusAuthor> authors;
UPROPERTY() TArray<FString> inCitations;
UPROPERTY() TArray<FString> outCitations;
UPROPERTY() int year;
UPROPERTY() int year = 0;
UPROPERTY() FString s2Url;
UPROPERTY() TArray<FString> sources;
UPROPERTY() TArray<FString> pdfUrls;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void FDcExtraCoreTypesStruct::MakeFixture()
QuatField2 = FQuat(0, 0, 0, 0);

TransformField1 = FTransform::Identity;
TransformField1 = FTransform(FQuat::Identity, FVector(1,2,3), FVector::OneVector);
TransformField2 = FTransform(FQuat::Identity, FVector(1,2,3), FVector::OneVector);

ColorField1 = FColor::Black;
ColorField2 = FColor::Blue;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

#include "HAL/UnrealMemory.h"

// UE checks uninitialized UPROPERTY() and reports warning on debug builds.
// The check can be manually invoked with `CoreUObject.AttemptToFindUninitializedScriptStructMembers`
// use this to generate a zeroinit constructor
#define DCEXTRA_ZEROINIT_CONSTRUCTOR(ClassName) \
ClassName() { FMemory::Memzero(this, sizeof(ClassName)); }
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "DataConfig/DcTypes.h"
#include "DataConfig/Deserialize/DcDeserializeTypes.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcDeserializeRenameStructFieldNames.generated.h"


Expand All @@ -23,7 +24,7 @@ struct FDcTestExtraRenameFrom1
GENERATED_BODY()

UPROPERTY() FString FromStr1;
UPROPERTY() int FromInt1;
UPROPERTY() int FromInt1 = 0;

FORCEINLINE friend uint32 GetTypeHash(const FDcTestExtraRenameFrom1& In)
{
Expand All @@ -43,7 +44,7 @@ struct FDcTestExtraRenameTo1
GENERATED_BODY()

UPROPERTY() FString ToStr1;
UPROPERTY() int ToInt1;
UPROPERTY() int ToInt1 = 0;

FORCEINLINE friend uint32 GetTypeHash(const FDcTestExtraRenameTo1& In)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct FDcExtraTestUser
{
GENERATED_BODY()

UPROPERTY() int Id;
UPROPERTY() int Id = 0;
UPROPERTY() FString Name;
UPROPERTY() FName Title;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "DataConfig/Deserialize/DcDeserializeTypes.h"
#include "DataConfig/Serialize/DcSerializeTypes.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcSerDeColor.generated.h"

/// `FColor` <-> hex string like `#FFGGBBAA`
Expand All @@ -18,6 +19,7 @@ USTRUCT()
struct FDcExtraTestStructWithColor1
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcExtraTestStructWithColor1)

UPROPERTY() FColor ColorField1;
UPROPERTY() FColor ColorField2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "CoreMinimal.h"
#include "Math/UnrealMath.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcExtraTestFixtures.generated.h"

USTRUCT()
Expand Down Expand Up @@ -74,6 +75,7 @@ USTRUCT(BlueprintType)
struct DATACONFIGEXTRA_API FDcStructShapeRectangle : public FDcStructShapeBase
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcStructShapeRectangle)

UPROPERTY(EditAnywhere) float Height;
UPROPERTY(EditAnywhere) float Width;
Expand All @@ -83,6 +85,7 @@ USTRUCT(BlueprintType)
struct DATACONFIGEXTRA_API FDcStructShapeCircle : public FDcStructShapeBase
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcStructShapeCircle)

UPROPERTY(EditAnywhere) float Radius;
};
Expand Down Expand Up @@ -131,14 +134,15 @@ struct DATACONFIGEXTRA_API FDcExtraSimpleStruct
GENERATED_BODY()

UPROPERTY() FString Name;
UPROPERTY() int Id;
UPROPERTY() EDcExtraTestEnum1 Type;
UPROPERTY() int Id = 0;
UPROPERTY() EDcExtraTestEnum1 Type = EDcExtraTestEnum1::Alpha;
};

USTRUCT()
struct DATACONFIGEXTRA_API FDcExtraCoreTypesStruct
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcExtraCoreTypesStruct)

UPROPERTY() FGuid GuidField1;
UPROPERTY() FGuid GuidField2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ struct FDcTestJsonConverter1

UPROPERTY() FString StrField;
UPROPERTY() FDcTestJsonConverterInner1 NestField;
UPROPERTY() int IntField;
UPROPERTY() bool BoolField;
UPROPERTY() int IntField = 0;
UPROPERTY() bool BoolField = false;
};

USTRUCT()
Expand All @@ -88,7 +88,7 @@ struct FDcTestJsonConverterArrayDim1
GENERATED_BODY()

UPROPERTY() FString StrArr[2];
UPROPERTY() int IntArr[3];
UPROPERTY() int IntArr[3] = {};
UPROPERTY() FMovie MovieArr[2];
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct FDcExtraTestStructNestInnerMost
GENERATED_BODY()

UPROPERTY() FString StrField;
UPROPERTY() class UDcExtraTestClassOuter* ObjField;
UPROPERTY() class UDcExtraTestClassOuter* ObjField = nullptr;

};

Expand Down
4 changes: 2 additions & 2 deletions DataConfig/Source/DataConfigTests/Private/DcTestBlurb.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct FDcTestExampleStruct
{
GENERATED_BODY()
UPROPERTY() FString StrField;
UPROPERTY() EDcTestExampleEnum EnumField;
UPROPERTY() EDcTestExampleEnum EnumField = EDcTestExampleEnum::Foo;
UPROPERTY() TArray<FColor> Colors;
};

Expand All @@ -24,7 +24,7 @@ struct FDcTestExampleSimple
GENERATED_BODY()

UPROPERTY() FString StrField;
UPROPERTY() int IntField;
UPROPERTY() int IntField = 0;
};


4 changes: 2 additions & 2 deletions DataConfig/Source/DataConfigTests/Private/DcTestBlurb2.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ struct FDcTestExample2
UPROPERTY() FString StrField;
UPROPERTY() FString StrArrField[3];

UPROPERTY() UDcBaseShape* InlineField;
UPROPERTY() UDcTestClass1* RefField;
UPROPERTY() UDcBaseShape* InlineField = nullptr;
UPROPERTY() UDcTestClass1* RefField = nullptr;

void MakeFixture();
};
2 changes: 1 addition & 1 deletion DataConfig/Source/DataConfigTests/Private/DcTestMsgPack.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct FMsgPackTestFixture
{
GENERATED_BODY()

UPROPERTY() EDcTestMsgPackCompareType Type;
UPROPERTY() EDcTestMsgPackCompareType Type = EDcTestMsgPackCompareType::Skip;
UPROPERTY() TArray<uint8> Expect;
UPROPERTY() TArray<FDcTestMsgPackBlob> Actuals;

Expand Down
29 changes: 15 additions & 14 deletions DataConfig/Source/DataConfigTests/Private/DcTestProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ struct FDcTestStruct1
GENERATED_BODY()

// basic scalar types
UPROPERTY() bool BoolField;
UPROPERTY() bool BoolField = false;
UPROPERTY() FName NameField;
UPROPERTY() FString StringField;
UPROPERTY() FText TextField;
UPROPERTY() EDcTestEnum1 EnumField;
UPROPERTY() EDcTestEnum1 EnumField = EDcTestEnum1::Foo;

UPROPERTY() float FloatField;
UPROPERTY() double DoubleField;
UPROPERTY() float FloatField = 0;
UPROPERTY() double DoubleField = 0;

UPROPERTY() int8 Int8Field;
UPROPERTY() int16 Int16Field;
UPROPERTY() int32 Int32Field;
UPROPERTY() int64 Int64Field;
UPROPERTY() int8 Int8Field = 0;
UPROPERTY() int16 Int16Field = 0;
UPROPERTY() int32 Int32Field = 0;
UPROPERTY() int64 Int64Field = 0;

UPROPERTY() uint8 UInt8Field;
UPROPERTY() uint16 UInt16Field;
UPROPERTY() uint32 UInt32Field;
UPROPERTY() uint64 UInt64Field;
UPROPERTY() uint8 UInt8Field = 0;
UPROPERTY() uint16 UInt16Field = 0;
UPROPERTY() uint32 UInt32Field = 0;
UPROPERTY() uint64 UInt64Field = 0;

void MakeFixture();
};
Expand Down Expand Up @@ -67,7 +67,7 @@ struct FDcTestStruct2
GENERATED_BODY()

// other scalar types
UPROPERTY() UClass* ClassField;
UPROPERTY() UClass* ClassField = nullptr;
UPROPERTY() TWeakObjectPtr<UObject> WeakObjetField;
UPROPERTY() TLazyObjectPtr<UObject> LazyObjectField;
UPROPERTY() TSoftObjectPtr<UObject> SoftObjectField;
Expand All @@ -85,7 +85,7 @@ struct FDcKeyableStruct
GENERATED_BODY()

UPROPERTY() FName Name;
UPROPERTY() int16 Index;
UPROPERTY() int16 Index = 0;

FORCEINLINE friend uint32 GetTypeHash(const FDcKeyableStruct& In)
{
Expand Down Expand Up @@ -133,6 +133,7 @@ USTRUCT()
struct FDcTestStruct4
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestStruct4)

// inline object
UPROPERTY() UDcBaseShape* InlineObjectField1;
Expand Down
5 changes: 4 additions & 1 deletion DataConfig/Source/DataConfigTests/Private/DcTestProperty2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "CoreMinimal.h"
#include "Math/NumericLimits.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcTestProperty2.generated.h"

USTRUCT()
Expand Down Expand Up @@ -115,6 +116,7 @@ USTRUCT()
struct FDcTestStructEnum1
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestStructEnum1)

UPROPERTY() EDcTestEnum_UInt8 EnumUInt8Field;
UPROPERTY() EDcTestEnum_UInt16 EnumUInt16Field;
Expand Down Expand Up @@ -145,6 +147,7 @@ USTRUCT()
struct FDcTestStructEnum2
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestStructEnum2)

UPROPERTY() TEnumAsByte<EDcTestEnum_Namespaced::Type> EnumNamespaced1;
UPROPERTY() TEnumAsByte<EDcTestEnum_Namespaced::Type> EnumNamespaced2;
Expand All @@ -155,7 +158,7 @@ struct FDcTestStructDefaultValue1
{
GENERATED_BODY()

UPROPERTY() int IntField1;
UPROPERTY() int IntField1 = -1;
UPROPERTY() int IntField2 = 123;
UPROPERTY() int IntField3 = 234;
};
Expand Down
3 changes: 3 additions & 0 deletions DataConfig/Source/DataConfigTests/Private/DcTestProperty3.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

#include "CoreMinimal.h"
#include "DcTestProperty.h"
#include "DataConfig/Extra/DcExtraCommon.h"
#include "DcTestProperty3.generated.h"


USTRUCT()
struct FDcTestMeta1
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestMeta1)

UPROPERTY(meta = (DcSkip)) int SkipField1;
};
Expand All @@ -18,6 +20,7 @@ USTRUCT()
struct FDcTestClassAccessControl
{
GENERATED_BODY()
DCEXTRA_ZEROINIT_CONSTRUCTOR(FDcTestClassAccessControl)

UPROPERTY() UDcBaseShape* InlineField;

Expand Down
Loading

0 comments on commit 77b5f29

Please sign in to comment.