clang-tidy fixes
This commit is contained in:
@ -212,7 +212,7 @@ void Input::file()
|
||||
|
||||
mstart = m;
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
if (maxline-m < 2) reallocate(line,maxline,0);
|
||||
|
||||
// end of file reached, so break
|
||||
@ -437,18 +437,18 @@ void Input::parse()
|
||||
}
|
||||
if (*ptr == '\'') {
|
||||
ptrmatch = strchr(ptr+1,'\'');
|
||||
if (ptrmatch == NULL)
|
||||
if (ptrmatch == nullptr)
|
||||
error->all(FLERR,"Unmatched single quote in command");
|
||||
ptr = ptrmatch + 1;
|
||||
} else if (*ptr == '"') {
|
||||
if (strstr(ptr,"\"\"\"") == ptr) {
|
||||
ptrmatch = strstr(ptr+3,"\"\"\"");
|
||||
if (ptrmatch == NULL)
|
||||
if (ptrmatch == nullptr)
|
||||
error->all(FLERR,"Unmatched triple quote in command");
|
||||
ptr = ptrmatch + 3;
|
||||
} else {
|
||||
ptrmatch = strchr(ptr+1,'"');
|
||||
if (ptrmatch == NULL)
|
||||
if (ptrmatch == nullptr)
|
||||
error->all(FLERR,"Unmatched double quote in command");
|
||||
ptr = ptrmatch + 1;
|
||||
}
|
||||
@ -669,7 +669,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
||||
|
||||
} else if (*ptr == '\'') {
|
||||
ptrmatch = strchr(ptr+1,'\'');
|
||||
if (ptrmatch == NULL)
|
||||
if (ptrmatch == nullptr)
|
||||
error->all(FLERR,"Unmatched single quote in command");
|
||||
nchars = ptrmatch+1 - ptr;
|
||||
strncpy(ptr2,ptr,nchars);
|
||||
@ -678,7 +678,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
||||
} else if (*ptr == '"') {
|
||||
if (strstr(ptr,"\"\"\"") == ptr) {
|
||||
ptrmatch = strstr(ptr+3,"\"\"\"");
|
||||
if (ptrmatch == NULL)
|
||||
if (ptrmatch == nullptr)
|
||||
error->all(FLERR,"Unmatched triple quote in command");
|
||||
nchars = ptrmatch+3 - ptr;
|
||||
strncpy(ptr2,ptr,nchars);
|
||||
@ -686,7 +686,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
||||
ptr2 += nchars;
|
||||
} else {
|
||||
ptrmatch = strchr(ptr+1,'"');
|
||||
if (ptrmatch == NULL)
|
||||
if (ptrmatch == nullptr)
|
||||
error->all(FLERR,"Unmatched double quote in command");
|
||||
nchars = ptrmatch+1 - ptr;
|
||||
strncpy(ptr2,ptr,nchars);
|
||||
|
||||
Reference in New Issue
Block a user