Skip to content

Commit c7f70b9

Browse files
committed
Revert "Updated #if to #ifdef for PR CesiumGS#1321"
This reverts commit 9925feb.
1 parent 9925feb commit c7f70b9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Source/CesiumRuntime/Private/CesiumSubLevelSwitcherComponent.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void UCesiumSubLevelSwitcherComponent::SetTargetSubLevel(
102102
}
103103
}
104104

105-
#ifdef ENGINE_VERSION_5_3_OR_HIGHER
105+
#if ENGINE_VERSION_5_3_OR_HIGHER
106106
#define StreamState ELevelStreamingState
107107
#else
108108
#define StreamState ULevelStreaming::ECurrentState
@@ -140,7 +140,7 @@ void UCesiumSubLevelSwitcherComponent::TickComponent(
140140
this->_getLevelStreamingForSubLevel(pSubLevel);
141141
StreamState state =
142142
IsValid(pStreaming)
143-
#ifdef ENGINE_VERSION_5_3_OR_HIGHER
143+
#if ENGINE_VERSION_5_3_OR_HIGHER
144144
? pStreaming->GetLevelStreamingState() //->GetCurrentState()
145145
#else
146146
? pStreaming->GetCurrentState()
@@ -174,7 +174,7 @@ void UCesiumSubLevelSwitcherComponent::TickComponent(
174174
this->_doExtraChecksOnNextTick = false;
175175
}
176176

177-
#ifdef WITH_EDITOR
177+
#if WITH_EDITOR
178178
UWorld* pWorld = this->GetWorld();
179179
if (!IsValid(pWorld))
180180
return;
@@ -211,7 +211,7 @@ void UCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() {
211211

212212
StreamState state = StreamState::Unloaded;
213213
if (IsValid(pStreaming)) {
214-
#ifdef ENGINE_VERSION_5_3_OR_HIGHER
214+
#if ENGINE_VERSION_5_3_OR_HIGHER
215215
state = pStreaming->GetLevelStreamingState();
216216
#else
217217
state = pStreaming->GetCurrentState();
@@ -278,7 +278,7 @@ void UCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() {
278278

279279
StreamState state = StreamState::Unloaded;
280280
if (IsValid(pStreaming)) {
281-
#ifdef ENGINE_VERSION_5_3_OR_HIGHER
281+
#if ENGINE_VERSION_5_3_OR_HIGHER
282282
state = pStreaming->GetLevelStreamingState();
283283
#else
284284

Source/CesiumRuntime/Private/CesiumTextureUtility.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ class FCesiumTextureResource : public FTextureResource {
273273

274274
uint32 GetSizeY() const override { return this->_height; }
275275

276-
#ifdef ENGINE_VERSION_5_3_OR_HIGHER
276+
#if ENGINE_VERSION_5_3_OR_HIGHER
277277
virtual void InitRHI(FRHICommandListBase& RHICmdList) override {
278278
#else
279279
virtual void InitRHI() override {
@@ -345,7 +345,7 @@ class FCesiumTextureResource : public FTextureResource {
345345
// RHICreateTexture2D can actually copy over all the mips in one shot,
346346
// but it expects a particular memory layout. Might be worth configuring
347347
// Cesium Native's mip-map generation to obey a standard memory layout.
348-
#ifdef ENGINE_VERSION_5_2_OR_HIGHER
348+
#if ENGINE_VERSION_5_2_OR_HIGHER
349349
rhiTexture = RHICreateTexture(
350350
FRHITextureCreateDesc::Create2D(createInfo.DebugName)
351351
.SetExtent(int32(this->_width), int32(this->_height))
@@ -414,7 +414,7 @@ FTexture2DRHIRef createAsyncTextureAndWait(
414414
ETextureCreateFlags Flags,
415415
void** InitialMipData,
416416
uint32 NumInitialMips) {
417-
#ifdef ENGINE_VERSION_5_3_OR_HIGHER
417+
#if ENGINE_VERSION_5_3_OR_HIGHER
418418
FGraphEventRef CompletionEvent;
419419

420420
FTexture2DRHIRef result = RHIAsyncCreateTexture2D(
@@ -889,7 +889,7 @@ UTexture2D* loadTextureGameThreadPart(LoadedTextureResult* pHalfLoadedTexture) {
889889
([pTexture, pCesiumTextureResource](FRHICommandListImmediate& RHICmdList) {
890890
pCesiumTextureResource->SetTextureReference(
891891
pTexture->TextureReference.TextureReferenceRHI);
892-
#ifdef ENGINE_VERSION_5_3_OR_HIGHER
892+
#if ENGINE_VERSION_5_3_OR_HIGHER
893893
pCesiumTextureResource->InitResource(FRHICommandListImmediate::Get()); //Init Resource now requires a command list.
894894
#else
895895
pCesiumTextureResource->InitResource();

0 commit comments

Comments
 (0)