Changeset 0784240 in git


Ignore:
Timestamp:
20/09/11 13:19:34 (8 years ago)
Author:
Olly Betts <olly@…>
Branches:
svn/1.0, svn/tags/1.0.40
Children:
cfda1be
Parents:
870439d
Message:

Backport change from 1.2.0:
src/gfxcore.h: Work around Mac OS X polluting the global namespace
with a "Point" class.

git-svn-id: file:///home/survex-svn/survex/branches/1.0@3710 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r870439d r0784240  
     1Tue Sep 20 12:18:26 GMT 2011  Olly Betts <olly@survex.com>
     2
     3        * Backport change from 1.2.0:
     4        * src/gfxcore.h: Work around Mac OS X polluting the global namespace
     5          with a "Point" class.
     6
    17Tue Sep 20 12:14:31 GMT 2011  Olly Betts <olly@survex.com>
    28
  • src/gfxcore.h

    r870439d r0784240  
    6262};
    6363
     64// Mac OS X headers pollute the global namespace with generic names like
     65// "class Point", which clashes with our "class Point".  So for __WXMAC__
     66// put our class in a namespace and define Point as a macro.
     67#ifdef __WXMAC__
     68namespace svx {
     69#endif
     70
    6471class Point {
    6572    friend class GfxCore;
     
    6976    Point(Double x_, Double y_, Double z_) : x(x_), y(y_), z(z_) {}
    7077};
     78
     79#ifdef __WXMAC__
     80}
     81#define Point svx::Point
     82#endif
    7183
    7284class LabelInfo;
Note: See TracChangeset for help on using the changeset viewer.