simplify by using utils::strdup() fmt::format() and reorder includes
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user