diff --git a/src/input.cpp b/src/input.cpp index 9028d4c1e5..4ed825a941 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -896,7 +896,7 @@ void Input::partition() { if (narg < 3) error->all(FLERR,"Illegal partition command"); - int yesflag=-1; + int yesflag; if (strcmp(arg[0],"yes") == 0) yesflag = 1; else if (strcmp(arg[0],"no") == 0) yesflag = 0; else error->all(FLERR,"Illegal partition command"); diff --git a/src/variable.cpp b/src/variable.cpp index aaa8237431..9d78631229 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -3656,41 +3656,6 @@ double Variable::constant(char *word) return 0.0; } -/* ---------------------------------------------------------------------- - read a floating point value from a string - generate an error if not a legitimate floating point value -------------------------------------------------------------------------- */ - -double Variable::numeric(char *str) -{ - int n = strlen(str); - for (int i = 0; i < n; i++) { - if (isdigit(str[i])) continue; - if (str[i] == '-' || str[i] == '+' || str[i] == '.') continue; - if (str[i] == 'e' || str[i] == 'E') continue; - error->all(FLERR, - "Expected floating point parameter in variable definition"); - } - - return atof(str); -} - -/* ---------------------------------------------------------------------- - read an integer value from a string - generate an error if not a legitimate integer value -------------------------------------------------------------------------- */ - -int Variable::inumeric(char *str) -{ - int n = strlen(str); - for (int i = 0; i < n; i++) { - if (isdigit(str[i]) || str[i] == '-' || str[i] == '+') continue; - error->all(FLERR,"Expected integer parameter in variable definition"); - } - - return atoi(str); -} - /* ---------------------------------------------------------------------- find next comma in str skip commas inside one or more nested parenthesis diff --git a/src/variable.h b/src/variable.h index ba7d6c88c0..cf4e76e33e 100644 --- a/src/variable.h +++ b/src/variable.h @@ -90,8 +90,6 @@ class Variable : protected Pointers { void atom_vector(char *, Tree **, Tree **, int &); int is_constant(char *); double constant(char *); - double numeric(char *); - int inumeric(char *); char *find_next_comma(char *); void print_tree(Tree *, int); };