mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +00:00
COMMON: Slight formatting fixes in array.h.
This commit is contained in:
parent
d6ac369303
commit
417cd7625c
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "common/scummsys.h"
|
#include "common/scummsys.h"
|
||||||
#include "common/algorithm.h"
|
#include "common/algorithm.h"
|
||||||
#include "common/textconsole.h" // For error()
|
#include "common/textconsole.h" // For error()
|
||||||
#include "common/memory.h"
|
#include "common/memory.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
@ -153,17 +153,17 @@ public:
|
|||||||
|
|
||||||
// TODO: insert, remove, ...
|
// TODO: insert, remove, ...
|
||||||
|
|
||||||
T& operator[](size_type idx) {
|
T &operator[](size_type idx) {
|
||||||
assert(idx < _size);
|
assert(idx < _size);
|
||||||
return _storage[idx];
|
return _storage[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
const T& operator[](size_type idx) const {
|
const T &operator[](size_type idx) const {
|
||||||
assert(idx < _size);
|
assert(idx < _size);
|
||||||
return _storage[idx];
|
return _storage[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
Array<T>& operator=(const Array<T> &array) {
|
Array<T> &operator=(const Array<T> &array) {
|
||||||
if (this == &array)
|
if (this == &array)
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
@ -201,24 +201,24 @@ public:
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(const Array<T> &other) const {
|
bool operator!=(const Array<T> &other) const {
|
||||||
return !(*this == other);
|
return !(*this == other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iterator begin() {
|
||||||
iterator begin() {
|
|
||||||
return _storage;
|
return _storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator end() {
|
iterator end() {
|
||||||
return _storage + _size;
|
return _storage + _size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const_iterator begin() const {
|
const_iterator begin() const {
|
||||||
return _storage;
|
return _storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
const_iterator end() const {
|
const_iterator end() const {
|
||||||
return _storage + _size;
|
return _storage + _size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user