aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/fs.h
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-03-06 18:30:44 +0000
committerPaweł Kołodziejski2003-03-06 18:30:44 +0000
commita8c3057875d7746bd48efd91406473a41bb7f607 (patch)
treed9c1b64164d473d401e9baf9f660727ce1551567 /backends/fs/fs.h
parent093428ae9a6a1fd33003a8a0827d7410501a74cb (diff)
downloadscummvm-rg350-a8c3057875d7746bd48efd91406473a41bb7f607.tar.gz
scummvm-rg350-a8c3057875d7746bd48efd91406473a41bb7f607.tar.bz2
scummvm-rg350-a8c3057875d7746bd48efd91406473a41bb7f607.zip
and more cleanup ....
svn-id: r6719
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];
}