Changeset 14544 for trunk/FACT++


Ignore:
Timestamp:
10/30/12 12:54:22 (12 years ago)
Author:
tbretz
Message:
Use a lock guard instead of lock/unlock
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/MessageImp.cc

    r14497 r14544  
    109109{
    110110    static mutex mtx;
    111 
    112     mtx.lock();
     111    const lock_guard<mutex> guard(mtx);
    113112
    114113    switch (severity)
     
    125124    }
    126125    fOut << time.GetAsStr("%H:%M:%S.%f") << " - " << txt << endl;
    127 
    128     mtx.unlock();
    129126
    130127    return 0;
Note: See TracChangeset for help on using the changeset viewer.