(svn r6836) - Codechange: constify SpriteGroup references. These used to be non-const when we kept a reference count, which we don't do anymore.
authorpeter1138
Thu, 19 Oct 2006 10:20:36 +0000
changeset 4892 6a1308a07117
parent 4891 74c29446124e
child 4893 07d158194395
(svn r6836) - Codechange: constify SpriteGroup references. These used to be non-const when we kept a reference count, which we don't do anymore.
newgrf_spritegroup.h
--- a/newgrf_spritegroup.h	Thu Oct 19 09:39:29 2006 +0000
+++ b/newgrf_spritegroup.h	Thu Oct 19 10:20:36 2006 +0000
@@ -19,8 +19,8 @@
 
 	byte num_loaded;       ///< Number of loaded groups
 	byte num_loading;      ///< Number of loading groups
-	SpriteGroup **loaded;  ///< List of loaded groups (can be SpriteIDs or Callback results)
-	SpriteGroup **loading; ///< List of loading groups (can be SpriteIDs or Callback results)
+	const SpriteGroup **loaded;  ///< List of loaded groups (can be SpriteIDs or Callback results)
+	const SpriteGroup **loading; ///< List of loading groups (can be SpriteIDs or Callback results)
 } RealSpriteGroup;
 
 /* Shared by deterministic and random groups. */
@@ -73,7 +73,7 @@
 
 
 typedef struct DeterministicSpriteGroupRange {
-	SpriteGroup *group;
+	const SpriteGroup *group;
 	uint32 low;
 	uint32 high;
 } DeterministicSpriteGroupRange;
@@ -88,7 +88,7 @@
 	DeterministicSpriteGroupRange *ranges; // Dynamically allocated
 
 	// Dynamically allocated, this is the sole owner
-	SpriteGroup *default_group;
+	const SpriteGroup *default_group;
 } DeterministicSpriteGroup;
 
 typedef enum RandomizedSpriteGroupCompareModes {
@@ -109,7 +109,7 @@
 	byte num_groups; // must be power of 2
 
 	// Take the group with appropriate index:
-	SpriteGroup **groups;
+	const SpriteGroup **groups;
 } RandomizedSpriteGroup;