Update rdctype::array to have a more stl-like mutable interface

* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
This commit is contained in:
baldurk
2017-11-03 16:01:58 +00:00
parent e8dc6471a3
commit 5e59616a8c
81 changed files with 1924 additions and 1369 deletions
@@ -66,7 +66,7 @@ public:
// NT paths
Renderer.ListFolder(lit("/"), true, [this, homeDir](const rdctype::str &path,
const rdctype::array<PathEntry> &files) {
for(int i = 0; i < files.count; i++)
for(int i = 0; i < files.count(); i++)
{
FSNode *node = new FSNode();
node->parent = NULL;
@@ -452,14 +452,14 @@ private:
Renderer.ListFolder(makePath(node), true, [this, node](const rdctype::str &path,
const rdctype::array<PathEntry> &files) {
if(files.count == 1 && (files[0].flags & PathProperty::ErrorAccessDenied))
if(files.count() == 1 && (files[0].flags & PathProperty::ErrorAccessDenied))
{
node->file.flags |= PathProperty::ErrorAccessDenied;
return;
}
QVector<PathEntry> sortedFiles;
sortedFiles.reserve(files.count);
sortedFiles.reserve(files.count());
for(const PathEntry &f : files)
sortedFiles.push_back(f);