mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
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:
parent
21898660f9
commit
5a169287f8
@ -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];
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user