[AD] ALLEGRO_NO_FIX_CLASS

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


This patch follows a suggestion from makes it possible to #define ALLEGRO_NO_FIX_CLASS before #include <allegro.h>, so that it will not pull in the `fix' class. Are there any objections to this?

a.cc thread: http://www.allegro.cc/forums/view_thread.php?_id=477721

Peter
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.315
diff -u -r1.315 allegro._tx
--- docs/src/allegro._tx	1 Apr 2005 08:50:54 -0000	1.315
+++ docs/src/allegro._tx	7 Apr 2005 09:12:09 -0000
@@ -12793,6 +12793,11 @@
    names, eg. fsqrt() calls fixsqrt(). If you define this symbol prior to
    including Allegro headers, the aliases will be turned off.
 
+<b>ALLEGRO_NO_FIX_CLASS</b><br>
+   If you define this symbol prior to including Allegro headers in a C++
+   source file, the 'fix' class will not be made available. This mitigates
+   problems with the 'fix' class's overloading getting in the way.
+
 <b>ALLEGRO_NO_CLEAR_BITMAP_ALIAS</b><br>
    If you define this prior to including Allegro headers, Allegro will not
    define the clear() backwards compatibility alias to clear_bitmap().
Index: include/allegro.h
===================================================================
RCS file: /cvsroot/alleg/allegro/include/allegro.h,v
retrieving revision 1.83
diff -u -r1.83 allegro.h
--- include/allegro.h	8 Mar 2005 10:00:16 -0000	1.83
+++ include/allegro.h	7 Apr 2005 09:12:09 -0000
@@ -66,8 +66,10 @@
    #include "allegro/alcompat.h"
 #endif
 
-#ifdef __cplusplus
-   #include "allegro/fix.h"
+#ifndef ALLEGRO_NO_FIX_CLASS
+   #ifdef __cplusplus
+      #include "allegro/fix.h"
+   #endif
 #endif
 
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/