use qualified auto
This commit is contained in:
@ -105,7 +105,7 @@ int BodyNparticle::unpack_border_body(AtomVecBody::Bonus *bonus, double *buf)
|
||||
void BodyNparticle::data_body(int ibonus, int ninteger, int ndouble,
|
||||
int *ifile, double *dfile)
|
||||
{
|
||||
auto bonus = &avec->bonus[ibonus];
|
||||
auto *bonus = &avec->bonus[ibonus];
|
||||
|
||||
// set ninteger, ndouble in bonus and allocate 2 vectors of ints, doubles
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ int ComputeBodyLocal::compute_body(int flag)
|
||||
// perform computation and fill output vector/array
|
||||
|
||||
int m,n,ibonus;
|
||||
auto values = new double[bptr->noutcol()];
|
||||
auto *values = new double[bptr->noutcol()];
|
||||
|
||||
double **x = atom->x;
|
||||
tagint *tag = atom->tag;
|
||||
|
||||
@ -109,7 +109,7 @@ BondBPM::~BondBPM()
|
||||
void BondBPM::init_style()
|
||||
{
|
||||
if (id_fix_store_local) {
|
||||
auto ifix = modify->get_fix_by_id(id_fix_store_local);
|
||||
auto *ifix = modify->get_fix_by_id(id_fix_store_local);
|
||||
if (!ifix) error->all(FLERR, "Cannot find fix STORE/LOCAL id {}", id_fix_store_local);
|
||||
if (strcmp(ifix->style, "STORE/LOCAL") != 0)
|
||||
error->all(FLERR, "Incorrect fix style matched, not STORE/LOCAL: {}", ifix->style);
|
||||
@ -156,7 +156,7 @@ void BondBPM::init_style()
|
||||
fix_update_special_bonds = dynamic_cast<FixUpdateSpecialBonds *>(fixes[0]);
|
||||
} else {
|
||||
id_fix_update_special_bonds = utils::strdup("BPM_UPDATE_SPECIAL_BONDS");
|
||||
auto newfix = modify->replace_fix(
|
||||
auto *newfix = modify->replace_fix(
|
||||
id_fix_dummy_special,
|
||||
fmt::format("{} all UPDATE_SPECIAL_BONDS", id_fix_update_special_bonds), 1);
|
||||
fix_update_special_bonds = dynamic_cast<FixUpdateSpecialBonds *>(newfix);
|
||||
@ -191,7 +191,7 @@ void BondBPM::init_style()
|
||||
|
||||
// Set up necessary history fix
|
||||
if (!fix_bond_history) {
|
||||
auto newfix = modify->replace_fix(
|
||||
auto *newfix = modify->replace_fix(
|
||||
id_fix_dummy_history,
|
||||
fmt::format("{} all BOND_HISTORY {} {}", id_fix_bond_history, update_flag, nhistory), 1);
|
||||
fix_bond_history = dynamic_cast<FixBondHistory *>(newfix);
|
||||
@ -270,7 +270,7 @@ void BondBPM::settings(int narg, char **arg)
|
||||
error->all(FLERR, "Storing local data must include at least one value to output");
|
||||
memory->create(output_data, nvalues, "bond/bpm:output_data");
|
||||
|
||||
auto ifix = modify->get_fix_by_id(id_fix_store_local);
|
||||
auto *ifix = modify->get_fix_by_id(id_fix_store_local);
|
||||
if (!ifix)
|
||||
ifix = modify->add_fix(
|
||||
fmt::format("{} all STORE/LOCAL {} {}", id_fix_store_local, store_local_freq, nvalues));
|
||||
@ -320,7 +320,7 @@ void BondBPM::settings(int narg, char **arg)
|
||||
|
||||
// Set up necessary history fix
|
||||
if (!fix_bond_history) {
|
||||
auto newfix = modify->replace_fix(
|
||||
auto *newfix = modify->replace_fix(
|
||||
id_fix_dummy_history,
|
||||
fmt::format("{} all BOND_HISTORY {} {}", id_fix_bond_history, update_flag, nhistory), 1);
|
||||
fix_bond_history = dynamic_cast<FixBondHistory *>(newfix);
|
||||
@ -457,7 +457,7 @@ void BondBPM::process_broken(int i, int j)
|
||||
bond_type[i][m] = bond_type[i][n - 1];
|
||||
bond_atom[i][m] = bond_atom[i][n - 1];
|
||||
for (auto &ihistory : histories) {
|
||||
auto fix_bond_history2 = dynamic_cast<FixBondHistory *>(ihistory);
|
||||
auto *fix_bond_history2 = dynamic_cast<FixBondHistory *>(ihistory);
|
||||
fix_bond_history2->shift_history(i, m, n - 1);
|
||||
fix_bond_history2->delete_history(i, n - 1);
|
||||
}
|
||||
@ -474,7 +474,7 @@ void BondBPM::process_broken(int i, int j)
|
||||
bond_type[j][m] = bond_type[j][n - 1];
|
||||
bond_atom[j][m] = bond_atom[j][n - 1];
|
||||
for (auto &ihistory : histories) {
|
||||
auto fix_bond_history2 = dynamic_cast<FixBondHistory *>(ihistory);
|
||||
auto *fix_bond_history2 = dynamic_cast<FixBondHistory *>(ihistory);
|
||||
fix_bond_history2->shift_history(j, m, n - 1);
|
||||
fix_bond_history2->delete_history(j, n - 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user