From 4b58e33b1e071fc9369c51c410670e7e92cf66ce Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 Jun 2020 15:24:10 -0400 Subject: [PATCH] remove local buffer for error message in Force class --- src/force.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/force.cpp b/src/force.cpp index c5b691dced..5359785b64 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -185,12 +185,9 @@ void Force::init() // check if pair style must be specified after restart if (pair_restart) { - if (!pair) { - char msg[128]; - snprintf(msg,128,"Must re-specify non-restarted pair style (%s) " - "after read_restart", pair_restart); - error->all(FLERR,msg); - } + if (!pair) + error->all(FLERR,fmt::format("Must re-specify non-restarted pair style " + "({}) after read_restart", pair_restart)); } if (kspace) kspace->init(); // kspace must come before pair