Author: manolo
Date: 2010-11-17 09:05:08 -0800 (Wed, 17 Nov 2010)
New Revision: 7868
Log:
Removed compilation warnings when compiling before 10.5 (STR 2428)
Modified:
branches/branch-1.3/src/fl_font_mac.cxx
Modified: branches/branch-1.3/src/fl_font_mac.cxx
===================================================================
--- branches/branch-1.3/src/fl_font_mac.cxx 2010-11-17 16:47:54 UTC (rev
7867)
+++ branches/branch-1.3/src/fl_font_mac.cxx 2010-11-17 17:05:08 UTC (rev
7868)
@@ -34,7 +34,9 @@
#define check_default_font() {if (!fl_fontsize) fl_font(0, 12);}
static const CGAffineTransform font_mx = { 1, 0, 0, -1, 0, 0 };
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
static SInt32 MACsystemVersion = 0;
+#endif
Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize Size) {
next = 0;
@@ -407,6 +409,7 @@
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
static CGColorRef flcolortocgcolor(Fl_Color i)
{
uchar r, g, b;
@@ -414,15 +417,13 @@
CGFloat components[4] = {r/255.0f, g/255.0f, b/255.0f, 1.};
static CGColorSpaceRef cspace = NULL;
if(cspace == NULL) {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
cspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
-#else
- cspace = CGColorSpaceCreateWithName(kCGColorSpaceUserRGB);
-#endif
}
return CGColorCreate(cspace, components);
}
+#endif
+
void fl_draw(const char *str, int n, float x, float y) {
if(fl_graphics_driver->type() != Fl_Quartz_Graphics_Driver::device_type) {
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit