simplify by using utils::strdup() fmt::format() and reorder includes

This commit is contained in:
Axel Kohlmeyer
2021-03-29 07:29:14 -04:00
parent b32570c15e
commit e481eb1154
13 changed files with 80 additions and 117 deletions

View File

@ -15,17 +15,18 @@
* Contributing author: Evangelos Voyiatzis (Royal DSM)
* ------------------------------------------------------------------------- */
#include "compute_gyration_shape_chunk.h"
#include "error.h"
#include "math_eigen.h"
#include "math_extra.h"
#include "math_special.h"
#include "memory.h"
#include "modify.h"
#include "update.h"
#include <cmath>
#include <cstring>
#include "error.h"
#include "math_extra.h"
#include "math_eigen.h"
#include "math_special.h"
#include "modify.h"
#include "memory.h"
#include "update.h"
using namespace LAMMPS_NS;
@ -37,9 +38,7 @@ ComputeGyrationShapeChunk::ComputeGyrationShapeChunk(LAMMPS *lmp, int narg, char
if (narg != 4) error->all(FLERR,"Illegal compute gyration/shape/chunk command");
// ID of compute gyration
int n = strlen(arg[3]) + 1;
id_gyration_chunk = new char[n];
strcpy(id_gyration_chunk,arg[3]);
id_gyration_chunk = utils::strdup(arg[3]);
init();