mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Reformat code for clang-format 15
This commit is contained in:
@@ -312,7 +312,9 @@ public:
|
||||
{
|
||||
switch(index.column())
|
||||
{
|
||||
case 0: { return node->file.filename;
|
||||
case 0:
|
||||
{
|
||||
return node->file.filename;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
@@ -458,37 +460,38 @@ private:
|
||||
if(!(node->file.flags & PathProperty::Directory))
|
||||
return;
|
||||
|
||||
Renderer.ListFolder(makePath(node), true, [node](const rdcstr &path,
|
||||
const rdcarray<PathEntry> &files) {
|
||||
if(files.count() == 1 && (files[0].flags & PathProperty::ErrorAccessDenied))
|
||||
{
|
||||
node->file.flags |= PathProperty::ErrorAccessDenied;
|
||||
return;
|
||||
}
|
||||
Renderer.ListFolder(
|
||||
makePath(node), true, [node](const rdcstr &path, const rdcarray<PathEntry> &files) {
|
||||
if(files.count() == 1 && (files[0].flags & PathProperty::ErrorAccessDenied))
|
||||
{
|
||||
node->file.flags |= PathProperty::ErrorAccessDenied;
|
||||
return;
|
||||
}
|
||||
|
||||
QVector<PathEntry> sortedFiles;
|
||||
sortedFiles.reserve(files.count());
|
||||
for(const PathEntry &f : files)
|
||||
sortedFiles.push_back(f);
|
||||
QVector<PathEntry> sortedFiles;
|
||||
sortedFiles.reserve(files.count());
|
||||
for(const PathEntry &f : files)
|
||||
sortedFiles.push_back(f);
|
||||
|
||||
std::sort(sortedFiles.begin(), sortedFiles.end(), [](const PathEntry &a, const PathEntry &b) {
|
||||
// sort greater than so that files with the flag are sorted before those without
|
||||
if((a.flags & PathProperty::Directory) != (b.flags & PathProperty::Directory))
|
||||
return (a.flags & PathProperty::Directory) > (b.flags & PathProperty::Directory);
|
||||
std::sort(
|
||||
sortedFiles.begin(), sortedFiles.end(), [](const PathEntry &a, const PathEntry &b) {
|
||||
// sort greater than so that files with the flag are sorted before those without
|
||||
if((a.flags & PathProperty::Directory) != (b.flags & PathProperty::Directory))
|
||||
return (a.flags & PathProperty::Directory) > (b.flags & PathProperty::Directory);
|
||||
|
||||
return strcmp(a.filename.c_str(), b.filename.c_str()) < 0;
|
||||
});
|
||||
return strcmp(a.filename.c_str(), b.filename.c_str()) < 0;
|
||||
});
|
||||
|
||||
for(int i = 0; i < sortedFiles.count(); i++)
|
||||
{
|
||||
FSNode *child = new FSNode();
|
||||
child->parent = node;
|
||||
child->parentIndex = i;
|
||||
child->file = sortedFiles[i];
|
||||
child->populated = !(child->file.flags & PathProperty::Directory);
|
||||
node->children.push_back(child);
|
||||
}
|
||||
});
|
||||
for(int i = 0; i < sortedFiles.count(); i++)
|
||||
{
|
||||
FSNode *child = new FSNode();
|
||||
child->parent = node;
|
||||
child->parentIndex = i;
|
||||
child->file = sortedFiles[i];
|
||||
child->populated = !(child->file.flags & PathProperty::Directory);
|
||||
node->children.push_back(child);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user