minor cleanup

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@7706 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2013-05-10 23:10:46 +00:00
parent 21898660f9
commit 5a169287f8
2 changed files with 6 additions and 10 deletions

View File

@ -3,7 +3,6 @@
#include "IPhreeqc.hpp" // IPhreeqc
#include "Phreeqc.h" // Phreeqc
#define _INC_PHREEQC_H
#include "thread.h"
#include "Debug.h" // ASSERT
@ -43,7 +42,6 @@ IPhreeqc::IPhreeqc(void)
, PhreeqcPtr(0)
, input_file(0)
, database_file(0)
/* , Index(IPhreeqc::InstancesIndex++) */
{
char buffer[80];

View File

@ -932,17 +932,15 @@ IPhreeqcLib::DestroyIPhreeqc(int id)
IPhreeqc*
IPhreeqcLib::GetInstance(int id)
{
std::map<size_t, IPhreeqc*>::iterator it;
bool found=false;
IPhreeqc* instance = 0;
mutex_lock(&map_lock);
it = IPhreeqc::Instances.find(size_t(id));
found = (it != IPhreeqc::Instances.end());
mutex_unlock(&map_lock);
if (found)
std::map<size_t, IPhreeqc*>::iterator it = IPhreeqc::Instances.find(size_t(id));
if (it != IPhreeqc::Instances.end())
{
return (*it).second;
instance = (*it).second;
}
return 0;
mutex_unlock(&map_lock);
return instance;
}
//// static method
//void IPhreeqcLib::CleanupIPhreeqcInstances(void)