You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
31 lines
644 B
C++
31 lines
644 B
C++
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
||
|
|
|
||
|
|
#include "DerivedDataSharedString.h"
|
||
|
|
|
||
|
|
#include "Misc/StringBuilder.h"
|
||
|
|
#include "Serialization/CompactBinary.h"
|
||
|
|
#include "Serialization/CompactBinarySerialization.h"
|
||
|
|
|
||
|
|
namespace UE::DerivedData
|
||
|
|
{
|
||
|
|
|
||
|
|
bool LoadFromCompactBinary(FCbFieldView Field, FUtf8SharedString& OutString)
|
||
|
|
{
|
||
|
|
OutString = Field.AsString();
|
||
|
|
return !Field.HasError();
|
||
|
|
}
|
||
|
|
|
||
|
|
bool LoadFromCompactBinary(FCbFieldView Field, FWideSharedString& OutString)
|
||
|
|
{
|
||
|
|
TWideStringBuilder<128> String;
|
||
|
|
if (LoadFromCompactBinary(Field, String))
|
||
|
|
{
|
||
|
|
OutString = String;
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
OutString.Reset();
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
} // UE::DerivedData
|