Use varargs version of Error:all() and Error::one() where applicable
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user