methods set to const, variables need to follow

This commit is contained in:
David Parkhurst 2021-03-26 11:10:09 -06:00
parent 6d67e22e0c
commit 380a6eaf06
3 changed files with 611 additions and 653 deletions

1241
Phreeqc.h

File diff suppressed because it is too large Load Diff

View File

@ -385,7 +385,7 @@ get_charge(char *charge, LDBLE * l_z)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_coef(LDBLE * coef, char **eqnaddr)
get_coef(LDBLE * coef, const char **eqnaddr)
/* ---------------------------------------------------------------------- */
/*
* Function reads through eqn and determines the coefficient of the next
@ -485,7 +485,7 @@ get_coef(LDBLE * coef, char **eqnaddr)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_elt(char **t_ptr, char *element, int *i)
get_elt(const char **t_ptr, char *element, int *i)
/* ---------------------------------------------------------------------- */
/*
* Function reads an element name out of the equation string.
@ -557,7 +557,7 @@ get_elt(char **t_ptr, char *element, int *i)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_elts_in_species(char **t_ptr, LDBLE coef)
get_elts_in_species(const char **t_ptr, LDBLE coef)
/* ---------------------------------------------------------------------- */
{
/*
@ -692,7 +692,7 @@ get_elts_in_species(char **t_ptr, LDBLE coef)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_secondary(char **t_ptr, char *element, int *i)
get_secondary(const char **t_ptr, char *element, int *i)
/* ---------------------------------------------------------------------- */
/*
* Function reads an element name out of the equation string.
@ -812,7 +812,7 @@ get_secondary(char **t_ptr, char *element, int *i)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_secondary_in_species(char **t_ptr, LDBLE coef)
get_secondary_in_species(const char **t_ptr, LDBLE coef)
/* ---------------------------------------------------------------------- */
{
/*
@ -942,7 +942,7 @@ get_secondary_in_species(char **t_ptr, LDBLE coef)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_num(char **t_ptr, LDBLE * num)
get_num(const char **t_ptr, LDBLE * num)
/* ---------------------------------------------------------------------- */
/*
* Function reads through a string looking for leading numeric field
@ -1005,7 +1005,7 @@ get_num(char **t_ptr, LDBLE * num)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_species(char **ptr)
get_species(const char **ptr)
/* ---------------------------------------------------------------------- */
{
/* Function reads next species out of the equation, including optional

View File

@ -337,7 +337,7 @@ compute_gfw(const char *string, LDBLE * gfw)
/* ---------------------------------------------------------------------- */
int Phreeqc::
copy_token(char *token_ptr, char **ptr, int *length)
copy_token(char *token_ptr, const char **ptr, int *length)
/* ---------------------------------------------------------------------- */
{
/*
@ -407,7 +407,7 @@ copy_token(char *token_ptr, char **ptr, int *length)
}
/* ---------------------------------------------------------------------- */
int Phreeqc::
copy_token(std::string &token, char **ptr)
copy_token(std::string &token, const char **ptr)
/* ---------------------------------------------------------------------- */
{
/*
@ -620,7 +620,7 @@ free_check_null(void *ptr)
/* ---------------------------------------------------------------------- */
int Phreeqc::
get_token(char **eqnaddr, char *string, LDBLE * l_z, int *l)
get_token(const char **eqnaddr, char *string, LDBLE * l_z, int *l)
/* ---------------------------------------------------------------------- */
/*
* Function finds next species in equation, coefficient has already
@ -726,8 +726,7 @@ get_token(char **eqnaddr, char *string, LDBLE * l_z, int *l)
/* error if no more space */
if (j >= MAX_LENGTH)
{
error_msg
("The charge on a species has exceeded MAX_LENGTH characters.",
error_msg("The charge on a species has exceeded MAX_LENGTH characters.",
CONTINUE);
return (ERROR);
}