From 01c5b06fa0a4c4bab0d9f0221439025e178bcbdf Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 13 May 2016 06:41:33 +0000 Subject: 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 --- src/Fl_Graphics_Driver.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3