mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Write around assert.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2746 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
d106dbea5c
commit
7a60bb9877
19
Surface.cxx
19
Surface.cxx
@ -170,16 +170,19 @@ struct surface *cxxSurface::cxxSurface2surface()
|
||||
surface_ptr->count_charge = 0;
|
||||
}
|
||||
// Need to fill in charge (number) in comps list
|
||||
int i,j;
|
||||
for (i = 0; i < surface_ptr->count_comps; i++) {
|
||||
char *charge_name = cxxSurfaceComp::get_charge_name(surface_ptr->comps[i].formula);
|
||||
for (j = 0; j < surface_ptr->count_charge; j++) {
|
||||
if (charge_name == surface_ptr->charge[j].name) {
|
||||
surface_ptr->comps[i].charge = j;
|
||||
break;
|
||||
if (surface_ptr->type != NO_EDL)
|
||||
{
|
||||
int i,j;
|
||||
for (i = 0; i < surface_ptr->count_comps; i++) {
|
||||
char *charge_name = cxxSurfaceComp::get_charge_name(surface_ptr->comps[i].formula);
|
||||
for (j = 0; j < surface_ptr->count_charge; j++) {
|
||||
if (charge_name == surface_ptr->charge[j].name) {
|
||||
surface_ptr->comps[i].charge = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(j < surface_ptr->count_charge);
|
||||
}
|
||||
assert(j < surface_ptr->count_charge);
|
||||
}
|
||||
|
||||
return(surface_ptr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user