2022-06-20 23:40:01 -04:00
|
|
|
// 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)
|
|
|
|
|
{
|
2022-06-27 15:21:57 -04:00
|
|
|
TWideStringBuilder<512> String;
|
2022-06-20 23:40:01 -04:00
|
|
|
if (LoadFromCompactBinary(Field, String))
|
|
|
|
|
{
|
|
|
|
|
OutString = String;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
OutString.Reset();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // UE::DerivedData
|