本文整理汇总了C++中MoveList::merge方法的典型用法代码示例。如果您正苦于以下问题:C++ MoveList::merge方法的具体用法?C++ MoveList::merge怎么用?C++ MoveList::merge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MoveList
的用法示例。
在下文中一共展示了MoveList::merge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SearchForNewMods
void CMissionManager::SearchForNewMods()
{
// List all PK4s in the fms/ directory
MoveList moveList = SearchForNewMods(".pk4");
MoveList zipMoveList = SearchForNewMods(".zip");
// Merge the zips into the pk4 list
if (!zipMoveList.empty())
{
moveList.merge(zipMoveList);
}
DM_LOG(LC_MAINMENU, LT_INFO)LOGSTRING("Found %d new mission packages.\r", static_cast<int>(moveList.size()));
gameLocal.Printf("Found %d new mission packages.\n", static_cast<int>(moveList.size()));
// greebo: The D3 engine should no longer hold locks on those files
// and we can start moving them into their respective locations
for (MoveList::const_iterator i = moveList.begin(); i != moveList.end(); ++i)
{
fs::path targetPath = i->second;
// Remove any target file first, to overwrite when moving
DoRemoveFile(targetPath);
// Move the file
DoMoveFile(i->first, targetPath);
// Remove the file portion
targetPath.remove_leaf();
// Remove any darkmod.txt, splashimage etc. when copying a new PK4. It may contain updated versions of those.
DoRemoveFile(targetPath / cv_tdm_fm_desc_file.GetString());
DoRemoveFile(targetPath / cv_tdm_fm_splashimage_file.GetString());
DoRemoveFile(targetPath / cv_tdm_fm_notes_file.GetString());
}
}