Commit 88221061 authored by Yaser Afshar's avatar Yaser Afshar
Browse files

Fix the `write_log_cite` interface.

Fix the interface by correcting the data type. The `model_name`
variable is a `char *` and not a `string`.
parent ad02d7a5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ void KimInit::do_variables(char *user_units, char *model_units)

/* ---------------------------------------------------------------------- */

void KimInit::write_log_cite(const std::string &model_name)
void KimInit::write_log_cite(char *model_name)
{
  KIM_Collections * coll;
  int err = KIM_Collections_Create(&coll);
@@ -505,10 +505,10 @@ void KimInit::write_log_cite(const std::string &model_name)
  int extent;
  if (model_type == MO) {
    err = KIM_Collections_CacheListOfItemMetadataFiles(
      coll,KIM_COLLECTION_ITEM_TYPE_portableModel,model_name.c_str(),&extent);
      coll,KIM_COLLECTION_ITEM_TYPE_portableModel,model_name,&extent);
  } else if (model_type == SM) {
    err = KIM_Collections_CacheListOfItemMetadataFiles(
      coll,KIM_COLLECTION_ITEM_TYPE_simulatorModel,model_name.c_str(),&extent);
      coll,KIM_COLLECTION_ITEM_TYPE_simulatorModel,model_name,&extent);
  } else {
    error->all(FLERR,"Unknown model type.");
  }
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class KimInit : protected Pointers {
  bool unit_conversion_mode;

  void determine_model_type_and_units(char *, char *, char **, KIM_Model *&);
  void write_log_cite(const std::string &);
  void write_log_cite(char *);
  void do_init(char *, char *, char *, KIM_Model *&);
  void do_variables(char*, char*);
};