summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-05-13 06:41:33 +0000
committerManolo Gouy <Manolo>2016-05-13 06:41:33 +0000
commit01c5b06fa0a4c4bab0d9f0221439025e178bcbdf (patch)
tree345326624ad28d4493666a759a864fe89ba43b5d
parentcc35e003eb62d088745b0108af6312885648dd2c (diff)
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
-rw-r--r--src/Fl_Graphics_Driver.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index bc53ef8f8..788dbccce 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -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;
}