mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 00:28:23 +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 "IPhreeqc.hpp" // IPhreeqc
|
||||||
#include "Phreeqc.h" // Phreeqc
|
#include "Phreeqc.h" // Phreeqc
|
||||||
#define _INC_PHREEQC_H
|
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
|
||||||
#include "Debug.h" // ASSERT
|
#include "Debug.h" // ASSERT
|
||||||
@ -43,7 +42,6 @@ IPhreeqc::IPhreeqc(void)
|
|||||||
, PhreeqcPtr(0)
|
, PhreeqcPtr(0)
|
||||||
, input_file(0)
|
, input_file(0)
|
||||||
, database_file(0)
|
, database_file(0)
|
||||||
/* , Index(IPhreeqc::InstancesIndex++) */
|
|
||||||
{
|
{
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
|
|
||||||
|
|||||||
@ -932,17 +932,15 @@ IPhreeqcLib::DestroyIPhreeqc(int id)
|
|||||||
IPhreeqc*
|
IPhreeqc*
|
||||||
IPhreeqcLib::GetInstance(int id)
|
IPhreeqcLib::GetInstance(int id)
|
||||||
{
|
{
|
||||||
std::map<size_t, IPhreeqc*>::iterator it;
|
IPhreeqc* instance = 0;
|
||||||
bool found=false;
|
|
||||||
mutex_lock(&map_lock);
|
mutex_lock(&map_lock);
|
||||||
it = IPhreeqc::Instances.find(size_t(id));
|
std::map<size_t, IPhreeqc*>::iterator it = IPhreeqc::Instances.find(size_t(id));
|
||||||
found = (it != IPhreeqc::Instances.end());
|
if (it != IPhreeqc::Instances.end())
|
||||||
mutex_unlock(&map_lock);
|
|
||||||
if (found)
|
|
||||||
{
|
{
|
||||||
return (*it).second;
|
instance = (*it).second;
|
||||||
}
|
}
|
||||||
return 0;
|
mutex_unlock(&map_lock);
|
||||||
|
return instance;
|
||||||
}
|
}
|
||||||
//// static method
|
//// static method
|
||||||
//void IPhreeqcLib::CleanupIPhreeqcInstances(void)
|
//void IPhreeqcLib::CleanupIPhreeqcInstances(void)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user