lemon/bits/windows.cc
branch1.3
changeset 1095 fbdde70389da
parent 1001 e344f0887c59
child 1143 f70f688d9ef9
equal deleted inserted replaced
6:cb8b4baed753 7:b690b982f730
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2010
     5  * Copyright (C) 2003-2013
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
     9  * Permission to use, modify and distribute this software is granted
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    10  * provided that this copyright notice appears in all copies. For
   138       _repr = lock;
   138       _repr = lock;
   139 #else
   139 #else
   140       _repr = 0; //Just to avoid 'unused variable' warning with clang
   140       _repr = 0; //Just to avoid 'unused variable' warning with clang
   141 #endif
   141 #endif
   142     }
   142     }
   143     
   143 
   144     WinLock::~WinLock() {
   144     WinLock::~WinLock() {
   145 #ifdef WIN32
   145 #ifdef WIN32
   146       CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr);
   146       CRITICAL_SECTION *lock = static_cast<CRITICAL_SECTION*>(_repr);
   147       DeleteCriticalSection(lock);
   147       DeleteCriticalSection(lock);
   148       delete lock;
   148       delete lock;