Use varargs version of Error:all() and Error::one() where applicable

This commit is contained in:
Axel Kohlmeyer
2021-04-25 21:30:51 -04:00
parent 4cbe6200d6
commit e9e0bb71b6
117 changed files with 522 additions and 524 deletions

View File

@ -61,8 +61,8 @@ void *Memory::smalloc(bigint nbytes, const char *name)
void *ptr = malloc(nbytes);
#endif
if (ptr == nullptr)
error->one(FLERR,fmt::format("Failed to allocate {} bytes for array {}",
nbytes,name));
error->one(FLERR,"Failed to allocate {} bytes for array {}",
nbytes,name);
return ptr;
}
@ -100,8 +100,8 @@ void *Memory::srealloc(void *ptr, bigint nbytes, const char *name)
ptr = realloc(ptr,nbytes);
#endif
if (ptr == nullptr)
error->one(FLERR,fmt::format("Failed to reallocate {} bytes for array {}",
nbytes,name));
error->one(FLERR,"Failed to reallocate {} bytes for array {}",
nbytes,name);
return ptr;
}
@ -125,6 +125,6 @@ void Memory::sfree(void *ptr)
void Memory::fail(const char *name)
{
error->one(FLERR,fmt::format("Cannot create/grow a vector/array of "
"pointers for {}",name));
error->one(FLERR,"Cannot create/grow a vector/array of "
"pointers for {}",name);
}