summaryrefslogtreecommitdiff
path: root/src/newgrf_storage.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-22 09:53:15 +0000
committerrubidium <rubidium@openttd.org>2011-01-22 09:53:15 +0000
commiteb299736c1bcb277da1862afe95c11cb897effcf (patch)
tree3bb6bff78f066da770a367e078c569dbe8ce319a /src/newgrf_storage.h
parent0cdb1c78cdbfce4d426441c21ef7066f1cfecf6f (diff)
downloadopenttd-eb299736c1bcb277da1862afe95c11cb897effcf.tar.xz
(svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n].
Diffstat (limited to 'src/newgrf_storage.h')
-rw-r--r--src/newgrf_storage.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/newgrf_storage.h b/src/newgrf_storage.h
index cff102ace..a85bbbde6 100644
--- a/src/newgrf_storage.h
+++ b/src/newgrf_storage.h
@@ -105,6 +105,10 @@ struct PersistentStorageArray : BaseStorageArray {
return this->storage[pos];
}
+ /**
+ * Clear the changes, or assign them permanently to the storage.
+ * @param keep_changes Whether to assign or ditch the changes.
+ */
void ClearChanges(bool keep_changes)
{
assert(this->prev_storage != NULL);
@@ -166,25 +170,7 @@ struct TemporaryStorageArray : BaseStorageArray {
}
};
-/**
- * Add the changed storage array to the list of changed arrays.
- * This is done so we only have to revert/save the changed
- * arrays, which saves quite a few clears, etc. after callbacks.
- * @param storage the array that has changed
- */
void AddChangedStorage(BaseStorageArray *storage);
-
-
-/**
- * Clear the changes made since the last ClearStorageChanges.
- * This is done for *all* storages that have been registered to with
- * AddChangedStorage since the previous ClearStorageChanges.
- *
- * This can be done in two ways:
- * - saving the changes permanently
- * - reverting to the previous version
- * @param keep_changes do we save or revert the changes since the last ClearChanges?
- */
void ClearStorageChanges(bool keep_changes);
#endif /* NEWGRF_STORAGE_H */