Switch to sprintf() instead of std::string etc.
This commit is contained in:
@ -20,8 +20,6 @@
|
||||
Hybrid and hybrid/overlay compatibility added by Ray Shan (Sandia)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "pair_reaxc.h"
|
||||
#include "atom.h"
|
||||
#include "update.h"
|
||||
@ -76,9 +74,7 @@ PairReaxC::PairReaxC(LAMMPS *lmp) : Pair(lmp)
|
||||
manybody_flag = 1;
|
||||
ghostneigh = 1;
|
||||
|
||||
std::stringstream ss;
|
||||
ss << "REAXC_" << std::dec << Pair::instance_me;
|
||||
fix_id = ss.str();
|
||||
sprintf(fix_id, "REAXC_%d", Pair::instance_me);
|
||||
|
||||
system = (reax_system *)
|
||||
memory->smalloc(sizeof(reax_system),"reax:system");
|
||||
@ -141,7 +137,7 @@ PairReaxC::~PairReaxC()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
if (fix_reax) modify->delete_fix(fix_id.c_str());
|
||||
if (fix_reax) modify->delete_fix(fix_id);
|
||||
|
||||
if (setup_flag) {
|
||||
Close_Output_Files( system, control, out_control, mpi_data );
|
||||
@ -418,7 +414,7 @@ void PairReaxC::init_style( )
|
||||
|
||||
if (fix_reax == NULL) {
|
||||
char **fixarg = new char*[3];
|
||||
fixarg[0] = (char *) fix_id.c_str();
|
||||
fixarg[0] = (char *) fix_id;
|
||||
fixarg[1] = (char *) "all";
|
||||
fixarg[2] = (char *) "REAXC";
|
||||
modify->add_fix(3,fixarg);
|
||||
|
||||
Reference in New Issue
Block a user