diff options
author | Einar Johan Trøan Sømåen | 2012-07-26 15:59:26 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-26 15:59:26 +0200 |
commit | ef11f9d0c53cbdd9d88a99143de6f43f34d7e24d (patch) | |
tree | 8dfaee0ba16e18a8e3772dd5afc9123d5c4e78d2 /engines/wintermute/ad/ad_path.cpp | |
parent | 38507fa9895620639d8733dbb4e085dfb2282a33 (diff) | |
download | scummvm-rg350-ef11f9d0c53cbdd9d88a99143de6f43f34d7e24d.tar.gz scummvm-rg350-ef11f9d0c53cbdd9d88a99143de6f43f34d7e24d.tar.bz2 scummvm-rg350-ef11f9d0c53cbdd9d88a99143de6f43f34d7e24d.zip |
WINTERMUTE: Run Astyle with add-braces to break one-line statements into easier-to-read-code.
Diffstat (limited to 'engines/wintermute/ad/ad_path.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_path.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/engines/wintermute/ad/ad_path.cpp b/engines/wintermute/ad/ad_path.cpp index f7832d621d..89be10f0fb 100644 --- a/engines/wintermute/ad/ad_path.cpp +++ b/engines/wintermute/ad/ad_path.cpp @@ -48,8 +48,9 @@ AdPath::~AdPath() { //////////////////////////////////////////////////////////////////////////
void AdPath::reset() {
- for (int i = 0; i < _points.getSize(); i++)
+ for (int i = 0; i < _points.getSize(); i++) {
delete _points[i];
+ }
_points.removeAll();
_currIndex = -1;
@@ -62,22 +63,30 @@ BasePoint *AdPath::getFirst() { if (_points.getSize() > 0) {
_currIndex = 0;
return _points[_currIndex];
- } else return NULL;
+ } else {
+ return NULL;
+ }
}
//////////////////////////////////////////////////////////////////////////
BasePoint *AdPath::getNext() {
_currIndex++;
- if (_currIndex < _points.getSize()) return _points[_currIndex];
- else return NULL;
+ if (_currIndex < _points.getSize()) {
+ return _points[_currIndex];
+ } else {
+ return NULL;
+ }
}
//////////////////////////////////////////////////////////////////////////
BasePoint *AdPath::getCurrent() {
- if (_currIndex >= 0 && _currIndex < _points.getSize()) return _points[_currIndex];
- else return NULL;
+ if (_currIndex >= 0 && _currIndex < _points.getSize()) {
+ return _points[_currIndex];
+ } else {
+ return NULL;
+ }
}
|