aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/fs/fs.h')
-rw-r--r--backends/fs/fs.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/backends/fs/fs.h b/backends/fs/fs.h
index abade8f189..a001fb202c 100644
--- a/backends/fs/fs.h
+++ b/backends/fs/fs.h
@@ -148,14 +148,12 @@ public:
*/
class FSList : ScummVM::List<FilesystemNode *> {
public:
- ~FSList()
- {
+ ~FSList() {
for (int i = 0; i < _size; i++)
delete _data[i];
}
- void push_back(const FilesystemNode& element)
- {
+ void push_back(const FilesystemNode &element) {
ensureCapacity(_size + 1);
// Determine where to insert the item.
// TODO this is inefficient, should use binary search instead
@@ -163,13 +161,12 @@ public:
while (i < _size && *_data[i] < element)
i++;
if (i < _size)
- memmove(&_data[i+1], &_data[i], (_size - i) * sizeof(FilesystemNode *));
+ memmove(&_data[i + 1], &_data[i], (_size - i) * sizeof(FilesystemNode *));
_data[i] = element.clone();
_size++;
}
- const FilesystemNode& operator [](int idx) const
- {
+ const FilesystemNode& operator [](int idx) const {
assert(idx >= 0 && idx < _size);
return *_data[idx];
}