Commit 168fe438 authored by Yaser Afshar's avatar Yaser Afshar
Browse files

Replace macro with `std::to_string`

Following the C++ Core Guidelines, Macros must go.
parent 78ddce5d
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -78,10 +78,6 @@ extern "C" {
#include "KIM_SimulatorHeaders.h"
}

#define SNUM(x)                                                \
  static_cast<std::ostringstream const &>(std::ostringstream() \
                                          << std::dec << x).str()

using namespace LAMMPS_NS;

#define MAXLINE 1024
@@ -139,7 +135,7 @@ void KimInteractions::do_setup(int narg, char **arg)

      for (int i = 0; i < narg; i++) {
        atom_type_sym_list += delimiter + arg[i];
        atom_type_num_list += delimiter + SNUM(species_to_atomic_no(arg[i]));
        atom_type_num_list += delimiter + std::to_string(species_to_atomic_no(arg[i]));
        delimiter = " ";
      }