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_scene_state.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_scene_state.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_scene_state.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/engines/wintermute/ad/ad_scene_state.cpp b/engines/wintermute/ad/ad_scene_state.cpp index 617f247241..8a223150f2 100644 --- a/engines/wintermute/ad/ad_scene_state.cpp +++ b/engines/wintermute/ad/ad_scene_state.cpp @@ -47,7 +47,9 @@ AdSceneState::~AdSceneState() { delete[] _filename;
_filename = NULL;
- for (int i = 0; i < _nodeStates.getSize(); i++) delete _nodeStates[i];
+ for (int i = 0; i < _nodeStates.getSize(); i++) {
+ delete _nodeStates[i];
+ }
_nodeStates.removeAll();
}
@@ -65,14 +67,18 @@ bool AdSceneState::persist(BasePersistenceManager *persistMgr) { void AdSceneState::setFilename(const char *filename) {
delete[] _filename;
_filename = new char [strlen(filename) + 1];
- if (_filename) strcpy(_filename, filename);
+ if (_filename) {
+ strcpy(_filename, filename);
+ }
}
//////////////////////////////////////////////////////////////////////////
AdNodeState *AdSceneState::getNodeState(const char *name, bool saving) {
for (int i = 0; i < _nodeStates.getSize(); i++) {
- if (scumm_stricmp(_nodeStates[i]->_name, name) == 0) return _nodeStates[i];
+ if (scumm_stricmp(_nodeStates[i]->_name, name) == 0) {
+ return _nodeStates[i];
+ }
}
if (saving) {
@@ -81,7 +87,9 @@ AdNodeState *AdSceneState::getNodeState(const char *name, bool saving) { _nodeStates.add(ret);
return ret;
- } else return NULL;
+ } else {
+ return NULL;
+ }
}
} // end of namespace WinterMute
|