ID strings are immutable, so make them const char * arguments
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
|
||||
#include "dump_vtk.h"
|
||||
|
||||
#include "arg_info.h"
|
||||
#include "atom.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
@ -1908,7 +1909,7 @@ void DumpVTK::identify_vectors()
|
||||
if already in list, do not add, just return index, else add to list
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int DumpVTK::add_compute(char *id)
|
||||
int DumpVTK::add_compute(const char *id)
|
||||
{
|
||||
int icompute;
|
||||
for (icompute = 0; icompute < ncompute; icompute++)
|
||||
@ -1933,7 +1934,7 @@ int DumpVTK::add_compute(char *id)
|
||||
if already in list, do not add, just return index, else add to list
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int DumpVTK::add_fix(char *id)
|
||||
int DumpVTK::add_fix(const char *id)
|
||||
{
|
||||
int ifix;
|
||||
for (ifix = 0; ifix < nfix; ifix++)
|
||||
@ -1958,7 +1959,7 @@ int DumpVTK::add_fix(char *id)
|
||||
if already in list, do not add, just return index, else add to list
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int DumpVTK::add_variable(char *id)
|
||||
int DumpVTK::add_variable(const char *id)
|
||||
{
|
||||
int ivariable;
|
||||
for (ivariable = 0; ivariable < nvariable; ivariable++)
|
||||
@ -1987,7 +1988,7 @@ int DumpVTK::add_variable(char *id)
|
||||
if already in list, do not add, just return index, else add to list
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int DumpVTK::add_custom(char *id, int flag)
|
||||
int DumpVTK::add_custom(const char *id, int flag)
|
||||
{
|
||||
int icustom;
|
||||
for (icustom = 0; icustom < ncustom; icustom++)
|
||||
|
||||
@ -81,10 +81,10 @@ class DumpVTK : public DumpCustom {
|
||||
|
||||
int parse_fields(int, char **);
|
||||
void identify_vectors();
|
||||
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 **);
|
||||
|
||||
typedef void (DumpVTK::*FnPtrHeader)(bigint);
|
||||
|
||||
Reference in New Issue
Block a user