本文整理汇总了C++中TSet::Sort方法的典型用法代码示例。如果您正苦于以下问题:C++ TSet::Sort方法的具体用法?C++ TSet::Sort怎么用?C++ TSet::Sort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSet
的用法示例。
在下文中一共展示了TSet::Sort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveManifests
bool FChunkManifestGenerator::SaveManifests(FSandboxPlatformFile* InSandboxFile)
{
// Always do package dependency work, is required to modify asset registry
FixupPackageDependenciesForChunks(InSandboxFile);
if (bGenerateChunks)
{
for (auto Platform : Platforms)
{
if (!GenerateStreamingInstallManifest(Platform->PlatformName()))
{
return false;
}
// Generate map for the platform abstraction
TMultiMap<FString, int32> ChunkMap; // asset -> ChunkIDs map
TSet<int32> ChunkIDsInUse;
const FString PlatformName = Platform->PlatformName();
// Collect all unique chunk indices and map all files to their chunks
for (int32 ChunkIndex = 0; ChunkIndex < FinalChunkManifests.Num(); ++ChunkIndex)
{
if (FinalChunkManifests[ChunkIndex] && FinalChunkManifests[ChunkIndex]->Num())
{
ChunkIDsInUse.Add(ChunkIndex);
for (auto& Filename : *FinalChunkManifests[ChunkIndex])
{
FString PlatFilename = Filename.Value.Replace(TEXT("[Platform]"), *PlatformName);
ChunkMap.Add(PlatFilename, ChunkIndex);
}
}
}
// Sort our chunk IDs and file paths
ChunkMap.KeySort(TLess<FString>());
ChunkIDsInUse.Sort(TLess<int32>());
// Platform abstraction will generate any required platform-specific files for the chunks
if (!Platform->GenerateStreamingInstallManifest(ChunkMap, ChunkIDsInUse))
{
return false;
}
}
GenerateAssetChunkInformationCSV(FPaths::Combine(*FPaths::GameLogDir(), TEXT("ChunkLists")));
}
return true;
}