You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
64 lines
1.2 KiB
C++
64 lines
1.2 KiB
C++
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "UnrealCodeAnalyzerTestsPCH.h"
|
|
#include "ThreadSafety.h"
|
|
|
|
int32 GGlobalValue;
|
|
#define MY_DEFINE(x) GGlobalValue = x;
|
|
|
|
void GGlobalFunc()
|
|
{}
|
|
|
|
class FClassWithStaticFunction
|
|
{
|
|
public:
|
|
static void StaticFunction()
|
|
{ }
|
|
};
|
|
|
|
class FStructWithStaticFunction
|
|
{
|
|
public:
|
|
static void StaticFunction()
|
|
{ }
|
|
};
|
|
|
|
void FunctionUsingInt(int32 Param)
|
|
{
|
|
|
|
}
|
|
|
|
void UObjectDerivedThreadSafetyTest::PostInitProperties()
|
|
{
|
|
Super::PostInitProperties();
|
|
|
|
MY_DEFINE(3);
|
|
GGlobalValue = 5;
|
|
GGlobalFunc();
|
|
FClassWithStaticFunction::StaticFunction();
|
|
FStructWithStaticFunction::StaticFunction();
|
|
FunctionUsingInt(GGlobalValue);
|
|
}
|
|
|
|
void UObjectDerivedThreadSafetyTest::Serialize(FArchive& Ar)
|
|
{
|
|
Super::Serialize(Ar);
|
|
|
|
MY_DEFINE(3);
|
|
GGlobalValue = 5;
|
|
GGlobalFunc();
|
|
FClassWithStaticFunction::StaticFunction();
|
|
FStructWithStaticFunction::StaticFunction();
|
|
FunctionUsingInt(GGlobalValue);
|
|
}
|
|
|
|
UObjectDerivedThreadSafetyTest::UObjectDerivedThreadSafetyTest()
|
|
{
|
|
MY_DEFINE(4);
|
|
GGlobalFunc();
|
|
GGlobalValue = 5;
|
|
FClassWithStaticFunction::StaticFunction();
|
|
FStructWithStaticFunction::StaticFunction();
|
|
FunctionUsingInt(GGlobalValue);
|
|
}
|