Slightly simpler Fl_Graphics_Driver::default_driver() function.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11732 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2016-05-13 06:41:33 +00:00
parent cc35e003eb
commit 01c5b06fa0
+2 -5
View File
@@ -3,7 +3,7 @@
//
// implementation of Fl_Graphics_Driver class for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2012 by Bill Spitzak and others.
// Copyright 2010-2016 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -42,10 +42,7 @@ Fl_Graphics_Driver::Fl_Graphics_Driver()
/** Return the graphics driver used when drawing to the platform's display */
Fl_Graphics_Driver &Fl_Graphics_Driver::default_driver()
{
static Fl_Graphics_Driver *pMainDriver = 0L;
if (!pMainDriver) {
pMainDriver = Fl_Display_Device::display_device()->driver();
}
static Fl_Graphics_Driver *pMainDriver = Fl_Display_Device::display_device()->driver();
return *pMainDriver;
}