(svn r3874) - Codechange: move the extern decleration of _patches_newgame inside the WE_CREATE event because it is only used there.
authorDarkvater
Tue, 14 Mar 2006 22:56:22 +0000
changeset 3206 7635c2101f2e
parent 3205 cfe0785b5171
child 3207 a06b4a8b573c
(svn r3874) - Codechange: move the extern decleration of _patches_newgame inside the WE_CREATE event because it is only used there.
settings_gui.c
--- a/settings_gui.c	Tue Mar 14 21:35:15 2006 +0000
+++ b/settings_gui.c	Tue Mar 14 22:56:22 2006 +0000
@@ -581,8 +581,6 @@
 	{_patches_ai,           lengthof(_patches_ai)},
 };
 
-extern Patches _patches_newgame;
-
 /** The main patches window. Shows a number of categories on top and
  * a selection of patches in that category.
  * Uses WP(w, def_d) macro - data_1, data_2, data_3 */
@@ -591,9 +589,10 @@
 	static Patches *patches_ptr;
 
 	switch (e->event) {
-	case WE_CREATE:
+	case WE_CREATE: {
+		extern Patches _patches_newgame;
 		patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches;
-		break;
+	} break;
 
 	case WE_PAINT: {
 		int x, y;