[Scummvm-cvs-logs] SF.net SVN: scummvm: [22885] scummvm/trunk/gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Jun 3 17:01:43 CEST 2006


Revision: 22885
Author:   fingolfin
Date:     2006-06-03 08:01:37 -0700 (Sat, 03 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22885&view=rev

Log Message:
-----------
Use full path in #include guard, to avoid name clashes; also, to declare constants, enum is preferred over #define (causes less hard-to-debug errors)

Modified Paths:
--------------
    scummvm/trunk/gui/Actions.h
    scummvm/trunk/gui/Key.h
Modified: scummvm/trunk/gui/Actions.h
===================================================================
--- scummvm/trunk/gui/Actions.h	2006-06-03 14:13:37 UTC (rev 22884)
+++ scummvm/trunk/gui/Actions.h	2006-06-03 15:01:37 UTC (rev 22885)
@@ -20,17 +20,16 @@
  *
  */
 
-#ifndef ACTIONS_H
-#define ACTIONS_H
+#ifndef GUI_ACTIONS_H
+#define GUI_ACTIONS_H
 
 #include "common/stdafx.h"
 #include "common/scummsys.h"
 #include "common/system.h"
 #include "gui/Key.h"
+
 namespace GUI {
 
-#define MAX_ACTIONS 20
-
 typedef int ActionType;
 
 class Actions {
@@ -69,6 +68,10 @@
 	Actions();
 
 protected:
+	enum {
+		MAX_ACTIONS = 20
+	};
+	
 	static Actions* _instance;
 	OSystem *_mainSystem;
 	Key _key_action[MAX_ACTIONS + 1];

Modified: scummvm/trunk/gui/Key.h
===================================================================
--- scummvm/trunk/gui/Key.h	2006-06-03 14:13:37 UTC (rev 22884)
+++ scummvm/trunk/gui/Key.h	2006-06-03 15:01:37 UTC (rev 22885)
@@ -20,8 +20,8 @@
  *
  */
 
-#ifndef KEY_H
-#define KEY_H
+#ifndef GUI_KEY_H
+#define GUI_KEY_H
 
 #include "common/stdafx.h"
 #include "common/scummsys.h"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list