mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Simplified test for missing solution.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2077 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
0bebfae5a5
commit
b2dd9ad8d1
12
Solution.cxx
12
Solution.cxx
@ -101,15 +101,17 @@ cxxNumKeyword()
|
||||
std::map<int, double>::const_iterator it;
|
||||
for (it = mixcomps->begin(); it != mixcomps->end(); it++)
|
||||
{
|
||||
const cxxSolution *cxxsoln_ptr1 = &(solutions.find(it->first)->second);
|
||||
if (cxxsoln_ptr1 == NULL)
|
||||
std::map<int, cxxSolution>::const_iterator sol = solutions.find(it->first);
|
||||
if (sol == solutions.end())
|
||||
{
|
||||
sprintf(error_string, "Solution %d not found in mix_cxxSolutions.", it->first);
|
||||
error_msg(error_string, CONTINUE);
|
||||
input_error++;
|
||||
return;
|
||||
}
|
||||
this->add(*cxxsoln_ptr1, it->second);
|
||||
} else
|
||||
{
|
||||
const cxxSolution *cxxsoln_ptr1 = &(sol->second);
|
||||
this->add(*cxxsoln_ptr1, it->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user