本文整理汇总了C++中FText::IdenticalTo方法的典型用法代码示例。如果您正苦于以下问题:C++ FText::IdenticalTo方法的具体用法?C++ FText::IdenticalTo怎么用?C++ FText::IdenticalTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FText
的用法示例。
在下文中一共展示了FText::IdenticalTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConditionalCompile_NoLock
void FTextFormatData::ConditionalCompile_NoLock()
{
// IdenticalTo compares our pointer against the static empty instance, rather than checking if our text is actually empty
// This is what we want to happen since a text using the static empty instance will never become non-empty, but an empty string might (due to a culture change, or in-editor change)
bool bRequiresCompile = SourceType == ESourceType::Text && !SourceText.IdenticalTo(FText::GetEmpty());
if (bRequiresCompile)
{
if (!CompiledTextSnapshot.IdenticalTo(SourceText))
{
if (!CompiledTextSnapshot.IsDisplayStringEqualTo(SourceText))
{
bRequiresCompile = true;
}
CompiledTextSnapshot = FTextSnapshot(SourceText); // Update this even if the text is lexically identical, as it will update the pointer compared by IdenticalTo for the next ConditionalCompile
}
}
if (bRequiresCompile)
{
Compile_NoLock();
}
}