本文整理汇总了C++中PathList::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ PathList::erase方法的具体用法?C++ PathList::erase怎么用?C++ PathList::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PathList
的用法示例。
在下文中一共展示了PathList::erase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeGridPath
void DataManager::removeGridPath(int x, int y, PathVect* path) {
PathList* objects = &GET_GRID_ITEM(grid,x,y).paths;
for (PathList::iterator it = objects->begin(); it != objects->end(); it++) {
if ((*it).second == path) {
objects->erase(it);
break;
}
}
}
示例2: findResourceDirs
PathList findResourceDirs(const fs::path& executable) {
fs::path mapcrafter_dir = findExecutableMapcrafterDir(executable);
PathList resources = {
mapcrafter_dir.parent_path() / "share" / "mapcrafter",
mapcrafter_dir / "data",
};
fs::path home = findHomeDir();
if (!home.empty())
resources.insert(resources.begin(), home / ".mapcrafter");
for (PathList::iterator it = resources.begin(); it != resources.end(); ) {
if (!fs::is_directory(*it))
resources.erase(it);
else
++it;
}
return resources;
}
示例3: findLoggingConfigFiles
PathList findLoggingConfigFiles(const fs::path& executable) {
fs::path mapcrafter_dir = findExecutableMapcrafterDir(findExecutablePath());
PathList configs = {
mapcrafter_dir.parent_path().parent_path() / "etc" / "mapcrafter" / "logging.conf",
mapcrafter_dir / "logging.conf",
};
fs::path home = findHomeDir();
if (!home.empty())
configs.insert(configs.begin(), home / ".mapcrafter" / "logging.conf");
for (PathList::iterator it = configs.begin(); it != configs.end(); ) {
if (!fs::is_regular_file(*it))
configs.erase(it);
else
++it;
}
return configs;
}