Author: cazfi
Date: Sun Jan 25 04:51:00 2015
New Revision: 27821

URL: http://svn.gna.org/viewcvs/freeciv?rev=27821&view=rev
Log:
Made upper-case TIMING_LOG() and TIMING_RESULTS() really macros - wrappers 
around the
functions they used to be. Have them empty in non-debug builds.

See bug #23172

Modified:
    branches/S2_6/server/srv_log.c
    branches/S2_6/server/srv_log.h

Modified: branches/S2_6/server/srv_log.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_log.c?rev=27821&r1=27820&r2=27821&view=diff
==============================================================================
--- branches/S2_6/server/srv_log.c      (original)
+++ branches/S2_6/server/srv_log.c      Sun Jan 25 04:51:00 2015
@@ -124,7 +124,7 @@
   Measure the time between the calls.  Used to see where in the AI too
   much CPU is being used.
 **************************************************************************/
-void TIMING_LOG(enum ai_timer timer, enum ai_timer_activity activity)
+void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity)
 {
   static int turn = -1;
   int i;
@@ -159,7 +159,7 @@
 /**************************************************************************
   Print results
 **************************************************************************/
-void TIMING_RESULTS(void)
+void timing_results_real(void)
 {
   char buf[200];
 

Modified: branches/S2_6/server/srv_log.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_log.h?rev=27821&r1=27820&r2=27821&view=diff
==============================================================================
--- branches/S2_6/server/srv_log.h      (original)
+++ branches/S2_6/server/srv_log.h      Sun Jan 25 04:51:00 2015
@@ -112,7 +112,15 @@
   }                                                                         \
 }
 
-void TIMING_LOG(enum ai_timer timer, enum ai_timer_activity activity);
-void TIMING_RESULTS(void);
+void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity);
+void timing_results_real(void);
+
+#ifdef DEBUG
+#define TIMING_LOG(timer, activity) timing_log_real(timer, activity)
+#define TIMING_RESULTS() timing_results_real()
+#else  /* DEBUG */
+#define TIMING_LOG(timer, activity)
+#define TIMING_RESULTS()
+#endif /* DEBUG */
 
 #endif  /* FC__SRV_LOG_H */


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to