src/newgrf_storage.h
changeset 7610 13b7d9e247d2
parent 7609 b70ffc13652a
child 8130 d2eb7d04f6e1
--- a/src/newgrf_storage.h	Sat Sep 22 12:59:43 2007 +0000
+++ b/src/newgrf_storage.h	Sat Sep 22 13:56:38 2007 +0000
@@ -21,7 +21,14 @@
 	 *  - reverting to the previous version
 	 * @param keep_changes do we save or revert the changes since the last ClearChanges?
 	 */
-	virtual void ClearChanges(bool keep_changes) {}
+	virtual void ClearChanges(bool keep_changes) = 0;
+
+	/**
+	 * Stores some value at a given position.
+	 * @param pos   the position to write at
+	 * @param value the value to write
+	 */
+	virtual void Store(uint pos, uint32 value) = 0;
 };
 
 /**
@@ -54,7 +61,7 @@
 	 * @param pos   the position to write at
 	 * @param value the value to write
 	 */
-	void Store(uint pos, TYPE value)
+	void Store(uint pos, uint32 value)
 	{
 		/* Out of the scope of the array */
 		if (pos >= SIZE) return;
@@ -83,7 +90,7 @@
 	 * @param pos the position to get the data from
 	 * @return the data from that position
 	 */
-	TYPE Get(uint pos)
+	TYPE Get(uint pos) const
 	{
 		/* Out of the scope of the array */
 		if (pos >= SIZE) return 0;
@@ -124,7 +131,7 @@
 	 * @param pos   the position to write at
 	 * @param value the value to write
 	 */
-	void Store(uint pos, TYPE value)
+	void Store(uint pos, uint32 value)
 	{
 		/* Out of the scope of the array */
 		if (pos >= SIZE) return;
@@ -138,7 +145,7 @@
 	 * @param pos the position to get the data from
 	 * @return the data from that position
 	 */
-	TYPE Get(uint pos)
+	TYPE Get(uint pos) const
 	{
 		/* Out of the scope of the array */
 		if (pos >= SIZE) return 0;