Simplify the DCLP singleton instances found by searching for methods named 'getInstance'.

This commit is contained in:
Adam Reichold
2015-11-28 12:31:43 +01:00
parent f77ca41a6f
commit 9ec0557edf
6 changed files with 12 additions and 69 deletions

View File

@@ -192,18 +192,8 @@ ICCStore::makeStdGammaProfile(cmsHPROFILE iprof)
ICCStore*
ICCStore::getInstance(void)
{
static ICCStore* instance_ = 0;
if ( instance_ == 0 ) {
static MyMutex smutex_;
MyMutex::MyLock lock(smutex_);
if ( instance_ == 0 ) {
instance_ = new ICCStore();
}
}
return instance_;
static ICCStore instance_;
return &instance_;
}
ICCStore::ICCStore ()