IDs are immutable strings

This commit is contained in:
Axel Kohlmeyer
2021-02-01 09:08:07 -05:00
parent 660572a0e6
commit 3b9f3d989e
2 changed files with 8 additions and 8 deletions

View File

@ -1584,7 +1584,7 @@ int DumpCustom::parse_fields(int narg, char **arg)
if already in list, do not add, just return index, else add to list
------------------------------------------------------------------------- */
int DumpCustom::add_compute(char *id)
int DumpCustom::add_compute(const char *id)
{
int icompute;
for (icompute = 0; icompute < ncompute; icompute++)
@ -1609,7 +1609,7 @@ int DumpCustom::add_compute(char *id)
if already in list, do not add, just return index, else add to list
------------------------------------------------------------------------- */
int DumpCustom::add_fix(char *id)
int DumpCustom::add_fix(const char *id)
{
int ifix;
for (ifix = 0; ifix < nfix; ifix++)
@ -1634,7 +1634,7 @@ int DumpCustom::add_fix(char *id)
if already in list, do not add, just return index, else add to list
------------------------------------------------------------------------- */
int DumpCustom::add_variable(char *id)
int DumpCustom::add_variable(const char *id)
{
int ivariable;
for (ivariable = 0; ivariable < nvariable; ivariable++)
@ -1663,7 +1663,7 @@ int DumpCustom::add_variable(char *id)
if already in list, do not add, just return index, else add to list
------------------------------------------------------------------------- */
int DumpCustom::add_custom(char *id, int flag)
int DumpCustom::add_custom(const char *id, int flag)
{
int icustom;
for (icustom = 0; icustom < ncustom; icustom++)

View File

@ -105,10 +105,10 @@ class DumpCustom : public Dump {
double memory_usage();
int parse_fields(int, char **);
int add_compute(char *);
int add_fix(char *);
int add_variable(char *);
int add_custom(char *, int);
int add_compute(const char *);
int add_fix(const char *);
int add_variable(const char *);
int add_custom(const char *, int);
virtual int modify_param(int, char **);
void header_format_binary();