Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
[Freeciv-Dev] [PATCH] cosmetic fix at server/stdinhand.c
Home

[Freeciv-Dev] [PATCH] cosmetic fix at server/stdinhand.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [PATCH] cosmetic fix at server/stdinhand.c
From: Markus Linnala <maage@xxxxxxxxx>
Date: 05 Jul 1999 01:53:46 +0300
Reply-to: Markus Linnala <maage@xxxxxxxxx>

Instead of using 0 use H_NONE. Also use & instead of + as I think it
is best choice when you are messing with bitfields.

diff -u --ignore-space-change --recursive --new-file --exclude-from=.diffignore 
freeciv-cvs/server/stdinhand.c m/freeciv/server/stdinhand.c
--- freeciv-cvs/server/stdinhand.c      Sat Jun 12 15:03:32 1999
+++ m/freeciv/server/stdinhand.c        Sat Jul  3 15:55:12 1999
@@ -775,9 +775,18 @@
 ***************************************************************/
 int handicap_of_skill_level(int level)
 {
-  int h[11] = { -1, 0, 0, H_RATES+H_TARGETS+H_HUTS,
-               0, H_RATES+H_TARGETS+H_HUTS, 0, 0,
-               0, 0, 0 };
+  int h[11] = { -1, 
+               H_NONE, 
+               H_NONE, 
+               H_RATES & H_TARGETS & H_HUTS,
+               H_NONE, 
+               H_RATES & H_TARGETS & H_HUTS, 
+               H_NONE, 
+               H_NONE, 
+               H_NONE, 
+               H_NONE, 
+               H_NONE, 
+               };
   
   assert(level>0 && level<=10);
   return h[level];

-- 
//Markus

[Prev in Thread] Current Thread [Next in Thread]