diff --git a/lib/poems/body23joint.cpp b/lib/poems/body23joint.cpp index 2f024a9a58..ef6d888aaf 100644 --- a/lib/poems/body23joint.cpp +++ b/lib/poems/body23joint.cpp @@ -30,8 +30,7 @@ Body23Joint::Body23Joint(){ DimQandU(4,2); } -Body23Joint::~Body23Joint(){ -} +Body23Joint::~Body23Joint() = default; JointType Body23Joint::GetType(){ return BODY23JOINT; diff --git a/lib/poems/freebodyjoint.cpp b/lib/poems/freebodyjoint.cpp index 113440bb08..84e47a25f6 100644 --- a/lib/poems/freebodyjoint.cpp +++ b/lib/poems/freebodyjoint.cpp @@ -30,8 +30,7 @@ FreeBodyJoint::FreeBodyJoint(){ DimQandU(7,6); } -FreeBodyJoint::~FreeBodyJoint(){ -} +FreeBodyJoint::~FreeBodyJoint() = default; JointType FreeBodyJoint::GetType(){ return FREEBODYJOINT; diff --git a/lib/poems/inertialframe.cpp b/lib/poems/inertialframe.cpp index d2939260b0..10d10f777c 100644 --- a/lib/poems/inertialframe.cpp +++ b/lib/poems/inertialframe.cpp @@ -33,8 +33,7 @@ InertialFrame::InertialFrame(){ alpha.Zeros(); alpha_t.Zeros(); } -InertialFrame::~InertialFrame(){ -} +InertialFrame::~InertialFrame() = default; BodyType InertialFrame::GetType(){ return INERTIALFRAME; diff --git a/lib/poems/joint.cpp b/lib/poems/joint.cpp index 6bd5029e1c..37028f3a97 100644 --- a/lib/poems/joint.cpp +++ b/lib/poems/joint.cpp @@ -33,8 +33,7 @@ Joint::Joint(){ pk_C_k.Identity(); } -Joint::~Joint(){ -} +Joint::~Joint() = default; void Joint::SetBodies(Body* b1, Body* b2){ body1 = b1; diff --git a/lib/poems/mixedjoint.cpp b/lib/poems/mixedjoint.cpp index 8597b3bb46..f9aad39615 100644 --- a/lib/poems/mixedjoint.cpp +++ b/lib/poems/mixedjoint.cpp @@ -26,11 +26,9 @@ -MixedJoint::MixedJoint(){ -} +MixedJoint::MixedJoint() = default; -MixedJoint::~MixedJoint(){ -} +MixedJoint::~MixedJoint() = default; JointType MixedJoint::GetType(){ return MIXEDJOINT; diff --git a/lib/poems/particle.cpp b/lib/poems/particle.cpp index 1993136923..0094a81ec0 100644 --- a/lib/poems/particle.cpp +++ b/lib/poems/particle.cpp @@ -19,11 +19,9 @@ #include "particle.h" #include "fixedpoint.h" -Particle::Particle(){ -} +Particle::Particle() = default; -Particle::~Particle(){ -} +Particle::~Particle() = default; BodyType Particle::GetType(){ return PARTICLE; diff --git a/lib/poems/point.cpp b/lib/poems/point.cpp index 680c30598e..a742473669 100644 --- a/lib/poems/point.cpp +++ b/lib/poems/point.cpp @@ -21,8 +21,7 @@ Point::Point(){ position.Zeros(); } -Point::~Point(){ -} +Point::~Point() = default; bool Point::ReadIn(std::istream& in){ return ReadInPointData(in); diff --git a/lib/poems/prismaticjoint.cpp b/lib/poems/prismaticjoint.cpp index e0a0e7b87a..b40705c8dc 100644 --- a/lib/poems/prismaticjoint.cpp +++ b/lib/poems/prismaticjoint.cpp @@ -27,8 +27,7 @@ PrismaticJoint::PrismaticJoint(){ u.Dim(1); udot.Dim(1); } -PrismaticJoint::~PrismaticJoint(){ -} +PrismaticJoint::~PrismaticJoint() = default; JointType PrismaticJoint::GetType(){ return PRISMATICJOINT; diff --git a/lib/poems/revolutejoint.cpp b/lib/poems/revolutejoint.cpp index eef83dc978..5a4ad3edfd 100644 --- a/lib/poems/revolutejoint.cpp +++ b/lib/poems/revolutejoint.cpp @@ -29,8 +29,7 @@ RevoluteJoint::RevoluteJoint(){ SetAxisPK(axis); } -RevoluteJoint::~RevoluteJoint(){ -} +RevoluteJoint::~RevoluteJoint() = default; JointType RevoluteJoint::GetType(){ return REVOLUTEJOINT; diff --git a/lib/poems/rigidbody.cpp b/lib/poems/rigidbody.cpp index 92963f93da..f5063df1e2 100644 --- a/lib/poems/rigidbody.cpp +++ b/lib/poems/rigidbody.cpp @@ -20,10 +20,8 @@ using namespace std; -RigidBody::RigidBody(){ -} -RigidBody::~RigidBody(){ -} +RigidBody::RigidBody() = default; +RigidBody::~RigidBody() = default; BodyType RigidBody::GetType(){ return RIGIDBODY; diff --git a/lib/poems/solver.cpp b/lib/poems/solver.cpp index 8380553d92..f6d0996d88 100644 --- a/lib/poems/solver.cpp +++ b/lib/poems/solver.cpp @@ -19,12 +19,9 @@ #include "system.h" #include "matrices.h" -Solver::Solver(){ +Solver::Solver() = default; -} - -Solver::~Solver(){ -} +Solver::~Solver() = default; void Solver::SetSystem(System* s){ system = s; diff --git a/lib/poems/sphericaljoint.cpp b/lib/poems/sphericaljoint.cpp index aadd3ebd67..e03ee77914 100644 --- a/lib/poems/sphericaljoint.cpp +++ b/lib/poems/sphericaljoint.cpp @@ -30,8 +30,7 @@ SphericalJoint::SphericalJoint(){ DimQandU(4,3); } -SphericalJoint::~SphericalJoint(){ -} +SphericalJoint::~SphericalJoint() = default; JointType SphericalJoint::GetType(){ return SPHERICALJOINT; diff --git a/src/CG-DNA/atom_vec_oxdna.cpp b/src/CG-DNA/atom_vec_oxdna.cpp index e1c99d7ca5..120fe5d9ac 100644 --- a/src/CG-DNA/atom_vec_oxdna.cpp +++ b/src/CG-DNA/atom_vec_oxdna.cpp @@ -52,9 +52,6 @@ AtomVecOxdna::AtomVecOxdna(LAMMPS *lmp) : AtomVec(lmp) error->warning(FLERR, "Write_data command requires newton on to preserve 3'->5' bond polarity"); } -/* ---------------------------------------------------------------------- */ -AtomVecOxdna::~AtomVecOxdna() {} - /* ---------------------------------------------------------------------- set local copies of all grow ptrs used by this class, except defaults needed in replicate when 2 atom classes exist and it calls pack_restart() diff --git a/src/CG-DNA/atom_vec_oxdna.h b/src/CG-DNA/atom_vec_oxdna.h index f05f6d2013..c100abdfff 100644 --- a/src/CG-DNA/atom_vec_oxdna.h +++ b/src/CG-DNA/atom_vec_oxdna.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class AtomVecOxdna : public AtomVec { public: AtomVecOxdna(class LAMMPS *); - ~AtomVecOxdna(); + ~AtomVecOxdna() = default; void grow_pointers(); void data_atom_post(int); diff --git a/src/COMPRESS/dump_atom_gz.cpp b/src/COMPRESS/dump_atom_gz.cpp index 5f799054bb..8bdc025436 100644 --- a/src/COMPRESS/dump_atom_gz.cpp +++ b/src/COMPRESS/dump_atom_gz.cpp @@ -27,10 +27,6 @@ DumpAtomGZ::DumpAtomGZ(LAMMPS *lmp, int narg, char **arg) : DumpAtom(lmp, narg, if (!compressed) error->all(FLERR, "Dump atom/gz only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpAtomGZ::~DumpAtomGZ() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_atom_gz.h b/src/COMPRESS/dump_atom_gz.h index 777c34345a..2b87e36f1d 100644 --- a/src/COMPRESS/dump_atom_gz.h +++ b/src/COMPRESS/dump_atom_gz.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class DumpAtomGZ : public DumpAtom { public: DumpAtomGZ(class LAMMPS *, int, char **); - virtual ~DumpAtomGZ(); + virtual ~DumpAtomGZ() = default; protected: GzFileWriter writer; diff --git a/src/COMPRESS/dump_atom_zstd.cpp b/src/COMPRESS/dump_atom_zstd.cpp index a23ea2025b..aa1c161d73 100644 --- a/src/COMPRESS/dump_atom_zstd.cpp +++ b/src/COMPRESS/dump_atom_zstd.cpp @@ -33,10 +33,6 @@ DumpAtomZstd::DumpAtomZstd(LAMMPS *lmp, int narg, char **arg) : DumpAtom(lmp, na if (!compressed) error->all(FLERR, "Dump atom/zstd only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpAtomZstd::~DumpAtomZstd() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_atom_zstd.h b/src/COMPRESS/dump_atom_zstd.h index 4a85089167..fb2da0c83b 100644 --- a/src/COMPRESS/dump_atom_zstd.h +++ b/src/COMPRESS/dump_atom_zstd.h @@ -34,7 +34,7 @@ namespace LAMMPS_NS { class DumpAtomZstd : public DumpAtom { public: DumpAtomZstd(class LAMMPS *, int, char **); - virtual ~DumpAtomZstd(); + virtual ~DumpAtomZstd() = default; protected: ZstdFileWriter writer; diff --git a/src/COMPRESS/dump_cfg_gz.cpp b/src/COMPRESS/dump_cfg_gz.cpp index 8d6347d978..8d85e8cf83 100644 --- a/src/COMPRESS/dump_cfg_gz.cpp +++ b/src/COMPRESS/dump_cfg_gz.cpp @@ -29,10 +29,6 @@ DumpCFGGZ::DumpCFGGZ(LAMMPS *lmp, int narg, char **arg) : DumpCFG(lmp, narg, arg if (!compressed) error->all(FLERR, "Dump cfg/gz only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpCFGGZ::~DumpCFGGZ() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_cfg_gz.h b/src/COMPRESS/dump_cfg_gz.h index ccd40141eb..153a4490c6 100644 --- a/src/COMPRESS/dump_cfg_gz.h +++ b/src/COMPRESS/dump_cfg_gz.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class DumpCFGGZ : public DumpCFG { public: DumpCFGGZ(class LAMMPS *, int, char **); - virtual ~DumpCFGGZ(); + virtual ~DumpCFGGZ() = default; protected: GzFileWriter writer; diff --git a/src/COMPRESS/dump_cfg_zstd.cpp b/src/COMPRESS/dump_cfg_zstd.cpp index 73ee3e7e11..6d70749479 100644 --- a/src/COMPRESS/dump_cfg_zstd.cpp +++ b/src/COMPRESS/dump_cfg_zstd.cpp @@ -35,10 +35,6 @@ DumpCFGZstd::DumpCFGZstd(LAMMPS *lmp, int narg, char **arg) : DumpCFG(lmp, narg, if (!compressed) error->all(FLERR, "Dump cfg/zstd only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpCFGZstd::~DumpCFGZstd() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_cfg_zstd.h b/src/COMPRESS/dump_cfg_zstd.h index ddcb06f00e..32013b274e 100644 --- a/src/COMPRESS/dump_cfg_zstd.h +++ b/src/COMPRESS/dump_cfg_zstd.h @@ -33,7 +33,7 @@ namespace LAMMPS_NS { class DumpCFGZstd : public DumpCFG { public: DumpCFGZstd(class LAMMPS *, int, char **); - virtual ~DumpCFGZstd(); + virtual ~DumpCFGZstd() = default; protected: ZstdFileWriter writer; diff --git a/src/COMPRESS/dump_custom_gz.cpp b/src/COMPRESS/dump_custom_gz.cpp index f40cf8d3d1..a8ef1ffe7c 100644 --- a/src/COMPRESS/dump_custom_gz.cpp +++ b/src/COMPRESS/dump_custom_gz.cpp @@ -27,10 +27,6 @@ DumpCustomGZ::DumpCustomGZ(LAMMPS *lmp, int narg, char **arg) : DumpCustom(lmp, if (!compressed) error->all(FLERR, "Dump custom/gz only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpCustomGZ::~DumpCustomGZ() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_custom_gz.h b/src/COMPRESS/dump_custom_gz.h index 10455eb8db..660af8bfae 100644 --- a/src/COMPRESS/dump_custom_gz.h +++ b/src/COMPRESS/dump_custom_gz.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class DumpCustomGZ : public DumpCustom { public: DumpCustomGZ(class LAMMPS *, int, char **); - virtual ~DumpCustomGZ(); + virtual ~DumpCustomGZ() = default; protected: GzFileWriter writer; diff --git a/src/COMPRESS/dump_custom_zstd.cpp b/src/COMPRESS/dump_custom_zstd.cpp index 347c9c08e2..c6c7e3592e 100644 --- a/src/COMPRESS/dump_custom_zstd.cpp +++ b/src/COMPRESS/dump_custom_zstd.cpp @@ -37,12 +37,6 @@ DumpCustomZstd::DumpCustomZstd(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Dump custom/zstd only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpCustomZstd::~DumpCustomZstd() -{ -} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_custom_zstd.h b/src/COMPRESS/dump_custom_zstd.h index a687cfb928..f179223265 100644 --- a/src/COMPRESS/dump_custom_zstd.h +++ b/src/COMPRESS/dump_custom_zstd.h @@ -34,7 +34,7 @@ namespace LAMMPS_NS { class DumpCustomZstd : public DumpCustom { public: DumpCustomZstd(class LAMMPS *, int, char **); - virtual ~DumpCustomZstd(); + virtual ~DumpCustomZstd() = default; protected: ZstdFileWriter writer; diff --git a/src/COMPRESS/dump_local_gz.cpp b/src/COMPRESS/dump_local_gz.cpp index a23fa1a1ac..c3669e6157 100644 --- a/src/COMPRESS/dump_local_gz.cpp +++ b/src/COMPRESS/dump_local_gz.cpp @@ -27,10 +27,6 @@ DumpLocalGZ::DumpLocalGZ(LAMMPS *lmp, int narg, char **arg) : DumpLocal(lmp, nar if (!compressed) error->all(FLERR, "Dump local/gz only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpLocalGZ::~DumpLocalGZ() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_local_gz.h b/src/COMPRESS/dump_local_gz.h index a6b1b118b7..e2e7a028aa 100644 --- a/src/COMPRESS/dump_local_gz.h +++ b/src/COMPRESS/dump_local_gz.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class DumpLocalGZ : public DumpLocal { public: DumpLocalGZ(class LAMMPS *, int, char **); - virtual ~DumpLocalGZ(); + virtual ~DumpLocalGZ() = default; protected: GzFileWriter writer; diff --git a/src/COMPRESS/dump_local_zstd.cpp b/src/COMPRESS/dump_local_zstd.cpp index 1d3fc4756e..63af89afcc 100644 --- a/src/COMPRESS/dump_local_zstd.cpp +++ b/src/COMPRESS/dump_local_zstd.cpp @@ -33,10 +33,6 @@ DumpLocalZstd::DumpLocalZstd(LAMMPS *lmp, int narg, char **arg) : DumpLocal(lmp, if (!compressed) error->all(FLERR, "Dump local/zstd only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpLocalZstd::~DumpLocalZstd() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_local_zstd.h b/src/COMPRESS/dump_local_zstd.h index c14e58fd71..fb4f017b3d 100644 --- a/src/COMPRESS/dump_local_zstd.h +++ b/src/COMPRESS/dump_local_zstd.h @@ -34,7 +34,7 @@ namespace LAMMPS_NS { class DumpLocalZstd : public DumpLocal { public: DumpLocalZstd(class LAMMPS *, int, char **); - virtual ~DumpLocalZstd(); + virtual ~DumpLocalZstd() = default; protected: ZstdFileWriter writer; diff --git a/src/COMPRESS/dump_xyz_gz.cpp b/src/COMPRESS/dump_xyz_gz.cpp index 2d9548bf14..9d38c4673c 100644 --- a/src/COMPRESS/dump_xyz_gz.cpp +++ b/src/COMPRESS/dump_xyz_gz.cpp @@ -26,10 +26,6 @@ DumpXYZGZ::DumpXYZGZ(LAMMPS *lmp, int narg, char **arg) : DumpXYZ(lmp, narg, arg if (!compressed) error->all(FLERR, "Dump xyz/gz only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpXYZGZ::~DumpXYZGZ() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_xyz_gz.h b/src/COMPRESS/dump_xyz_gz.h index 5fe60ced6f..62a25cfc66 100644 --- a/src/COMPRESS/dump_xyz_gz.h +++ b/src/COMPRESS/dump_xyz_gz.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class DumpXYZGZ : public DumpXYZ { public: DumpXYZGZ(class LAMMPS *, int, char **); - virtual ~DumpXYZGZ(); + virtual ~DumpXYZGZ() = default; protected: GzFileWriter writer; diff --git a/src/COMPRESS/dump_xyz_zstd.cpp b/src/COMPRESS/dump_xyz_zstd.cpp index b56488ec09..bcbdc08a24 100644 --- a/src/COMPRESS/dump_xyz_zstd.cpp +++ b/src/COMPRESS/dump_xyz_zstd.cpp @@ -32,10 +32,6 @@ DumpXYZZstd::DumpXYZZstd(LAMMPS *lmp, int narg, char **arg) : DumpXYZ(lmp, narg, if (!compressed) error->all(FLERR, "Dump xyz/zstd only writes compressed files"); } -/* ---------------------------------------------------------------------- */ - -DumpXYZZstd::~DumpXYZZstd() {} - /* ---------------------------------------------------------------------- generic opening of a dump file ASCII or binary or compressed diff --git a/src/COMPRESS/dump_xyz_zstd.h b/src/COMPRESS/dump_xyz_zstd.h index add279c4e7..110e27ab8f 100644 --- a/src/COMPRESS/dump_xyz_zstd.h +++ b/src/COMPRESS/dump_xyz_zstd.h @@ -34,7 +34,7 @@ namespace LAMMPS_NS { class DumpXYZZstd : public DumpXYZ { public: DumpXYZZstd(class LAMMPS *, int, char **); - virtual ~DumpXYZZstd(); + virtual ~DumpXYZZstd() = default; protected: ZstdFileWriter writer; diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.cpp b/src/DIELECTRIC/fix_polarize_bem_icc.cpp index 35171c0a19..7bd6ff25bd 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_icc.cpp @@ -93,10 +93,6 @@ FixPolarizeBEMICC::FixPolarizeBEMICC(LAMMPS *lmp, int narg, char **arg) : Fix(lm /* ---------------------------------------------------------------------- */ -FixPolarizeBEMICC::~FixPolarizeBEMICC() {} - -/* ---------------------------------------------------------------------- */ - int FixPolarizeBEMICC::setmask() { int mask = 0; diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.h b/src/DIELECTRIC/fix_polarize_bem_icc.h index 6ba6acb1a0..df04b52fdf 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.h +++ b/src/DIELECTRIC/fix_polarize_bem_icc.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class FixPolarizeBEMICC : public Fix { public: FixPolarizeBEMICC(class LAMMPS *, int, char **); - ~FixPolarizeBEMICC(); + ~FixPolarizeBEMICC() = default; virtual int setmask(); virtual void init(); virtual void setup(int); diff --git a/src/DPD-MESO/fix_edpd_source.cpp b/src/DPD-MESO/fix_edpd_source.cpp index 0ad303516a..83ff896ff9 100644 --- a/src/DPD-MESO/fix_edpd_source.cpp +++ b/src/DPD-MESO/fix_edpd_source.cpp @@ -61,12 +61,6 @@ FixEDPDSource::FixEDPDSource(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -FixEDPDSource::~FixEDPDSource() -{ -} - -/* ---------------------------------------------------------------------- */ - int FixEDPDSource::setmask() { int mask = 0; diff --git a/src/DPD-MESO/fix_edpd_source.h b/src/DPD-MESO/fix_edpd_source.h index 0d6fab1d9d..13eecc7c56 100644 --- a/src/DPD-MESO/fix_edpd_source.h +++ b/src/DPD-MESO/fix_edpd_source.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class FixEDPDSource : public Fix { public: FixEDPDSource(class LAMMPS *, int, char **); - ~FixEDPDSource(); + ~FixEDPDSource() = default; int setmask(); void init(); void post_force(int); diff --git a/src/DPD-MESO/fix_tdpd_source.cpp b/src/DPD-MESO/fix_tdpd_source.cpp index 5eb7416d5b..80848d553d 100644 --- a/src/DPD-MESO/fix_tdpd_source.cpp +++ b/src/DPD-MESO/fix_tdpd_source.cpp @@ -62,12 +62,6 @@ FixTDPDSource::FixTDPDSource(LAMMPS *lmp, int narg, char **arg) : /* ---------------------------------------------------------------------- */ -FixTDPDSource::~FixTDPDSource() -{ -} - -/* ---------------------------------------------------------------------- */ - int FixTDPDSource::setmask() { int mask = 0; diff --git a/src/DPD-MESO/fix_tdpd_source.h b/src/DPD-MESO/fix_tdpd_source.h index fe0a806ac2..8bd9778ed0 100644 --- a/src/DPD-MESO/fix_tdpd_source.h +++ b/src/DPD-MESO/fix_tdpd_source.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class FixTDPDSource : public Fix { public: FixTDPDSource(class LAMMPS *, int, char **); - ~FixTDPDSource(); + ~FixTDPDSource() = default; int setmask(); void init(); void post_force(int); diff --git a/src/DPD-REACT/nbin_ssa.cpp b/src/DPD-REACT/nbin_ssa.cpp index 993a41b356..c6ef22fe7d 100644 --- a/src/DPD-REACT/nbin_ssa.cpp +++ b/src/DPD-REACT/nbin_ssa.cpp @@ -34,10 +34,6 @@ NBinSSA::NBinSSA(LAMMPS *lmp) : NBinStandard(lmp) } } -NBinSSA::~NBinSSA() -{ -} - /* ---------------------------------------------------------------------- bin owned and ghost atoms for the Shardlow Splitting Algorithm (SSA) local atoms are in distinct bins (binhead[]) from the ghosts diff --git a/src/DPD-REACT/nbin_ssa.h b/src/DPD-REACT/nbin_ssa.h index c09ef7b692..5285c5b44d 100644 --- a/src/DPD-REACT/nbin_ssa.h +++ b/src/DPD-REACT/nbin_ssa.h @@ -41,7 +41,7 @@ class NBinSSA : public NBinStandard { int lbinzhi; // highest local bin z-dim coordinate NBinSSA(class LAMMPS *); - ~NBinSSA(); + virtual ~NBinSSA() = default; void bin_atoms_setup(int); void bin_atoms(); diff --git a/src/KSPACE/ewald_dipole_spin.cpp b/src/KSPACE/ewald_dipole_spin.cpp index 6f093d5d0a..1f08205f21 100644 --- a/src/KSPACE/ewald_dipole_spin.cpp +++ b/src/KSPACE/ewald_dipole_spin.cpp @@ -51,12 +51,6 @@ EwaldDipoleSpin::EwaldDipoleSpin(LAMMPS *lmp) : mub2mu0hbinv = mub2mu0 / hbar; // in rad.THz } -/* ---------------------------------------------------------------------- - free all memory -------------------------------------------------------------------------- */ - -EwaldDipoleSpin::~EwaldDipoleSpin() {} - /* ---------------------------------------------------------------------- called once before run ------------------------------------------------------------------------- */ diff --git a/src/KSPACE/ewald_dipole_spin.h b/src/KSPACE/ewald_dipole_spin.h index eb87c69ae2..4660dde987 100644 --- a/src/KSPACE/ewald_dipole_spin.h +++ b/src/KSPACE/ewald_dipole_spin.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class EwaldDipoleSpin : public EwaldDipole { public: EwaldDipoleSpin(class LAMMPS *); - virtual ~EwaldDipoleSpin(); + virtual ~EwaldDipoleSpin() = default; void init(); void setup(); void compute(int, int); diff --git a/src/LATBOLTZ/fix_lb_viscous.cpp b/src/LATBOLTZ/fix_lb_viscous.cpp index 95e36a98a9..0873a0fc94 100644 --- a/src/LATBOLTZ/fix_lb_viscous.cpp +++ b/src/LATBOLTZ/fix_lb_viscous.cpp @@ -55,13 +55,6 @@ FixLbViscous::FixLbViscous(LAMMPS *lmp, int narg, char **arg) : } -} - -/* ---------------------------------------------------------------------- */ - -FixLbViscous::~FixLbViscous() -{ - } /* ---------------------------------------------------------------------- */ diff --git a/src/LATBOLTZ/fix_lb_viscous.h b/src/LATBOLTZ/fix_lb_viscous.h index 1d08a15463..8c86e47553 100644 --- a/src/LATBOLTZ/fix_lb_viscous.h +++ b/src/LATBOLTZ/fix_lb_viscous.h @@ -27,7 +27,7 @@ namespace LAMMPS_NS { class FixLbViscous : public Fix { public: FixLbViscous(class LAMMPS *, int, char **); - ~FixLbViscous(); + virtual ~FixLbViscous() = default; int setmask(); void init(); void setup(int); diff --git a/src/MANIFOLD/manifold_thylakoid_shared.cpp b/src/MANIFOLD/manifold_thylakoid_shared.cpp index b71cf23e5e..5efc20a298 100644 --- a/src/MANIFOLD/manifold_thylakoid_shared.cpp +++ b/src/MANIFOLD/manifold_thylakoid_shared.cpp @@ -90,11 +90,6 @@ thyla_part::thyla_part( int type, double *args, double xlo, double ylo, double z z0 = (type == THYLA_TYPE_SPHERE) ? params[3] : params[5]; } - - -thyla_part::~thyla_part() -{} - double thyla_part::g(const double *x) { switch(type) { diff --git a/src/MANIFOLD/manifold_thylakoid_shared.h b/src/MANIFOLD/manifold_thylakoid_shared.h index a90d5e8801..67909802b0 100644 --- a/src/MANIFOLD/manifold_thylakoid_shared.h +++ b/src/MANIFOLD/manifold_thylakoid_shared.h @@ -33,7 +33,7 @@ namespace user_manifold { thyla_part(int type, double *args, double xlo, double ylo, double zlo, double xhi, double yhi, double zhi); thyla_part() : type(-1), x0(-1337), y0(-1337), z0(-1337) {} - ~thyla_part(); + ~thyla_part() = default; double g(const double *x); void n(const double *x, double *n); diff --git a/src/MESONT/pair_mesont_tpm.cpp b/src/MESONT/pair_mesont_tpm.cpp index 64aeeeeadd..425722a569 100644 --- a/src/MESONT/pair_mesont_tpm.cpp +++ b/src/MESONT/pair_mesont_tpm.cpp @@ -38,7 +38,7 @@ using namespace LAMMPS_NS; class MESONTList { public: MESONTList(const Atom* atom, const NeighList* nblist); - ~MESONTList() {}; + ~MESONTList() = default;; //list of segments const std::vector>& get_segments() const; //list of triplets diff --git a/src/ML-IAP/mliap_model_linear.cpp b/src/ML-IAP/mliap_model_linear.cpp index 1323b95aa1..08654783d8 100644 --- a/src/ML-IAP/mliap_model_linear.cpp +++ b/src/ML-IAP/mliap_model_linear.cpp @@ -31,10 +31,6 @@ MLIAPModelLinear::MLIAPModelLinear(LAMMPS* lmp, char* coefffilename) : if (nparams > 0) ndescriptors = nparams - 1; } -/* ---------------------------------------------------------------------- */ - -MLIAPModelLinear::~MLIAPModelLinear() {} - /* ---------------------------------------------------------------------- get number of parameters ---------------------------------------------------------------------- */ diff --git a/src/ML-IAP/mliap_model_linear.h b/src/ML-IAP/mliap_model_linear.h index b485e58eff..d2abaec31e 100644 --- a/src/ML-IAP/mliap_model_linear.h +++ b/src/ML-IAP/mliap_model_linear.h @@ -21,7 +21,7 @@ namespace LAMMPS_NS { class MLIAPModelLinear : public MLIAPModelSimple { public: MLIAPModelLinear(LAMMPS *, char * = nullptr); - ~MLIAPModelLinear(); + ~MLIAPModelLinear() = default; virtual int get_nparams(); virtual int get_gamma_nnz(class MLIAPData *); virtual void compute_gradients(class MLIAPData *); diff --git a/src/ML-IAP/mliap_model_quadratic.cpp b/src/ML-IAP/mliap_model_quadratic.cpp index a881c7848c..10507adc91 100644 --- a/src/ML-IAP/mliap_model_quadratic.cpp +++ b/src/ML-IAP/mliap_model_quadratic.cpp @@ -34,10 +34,6 @@ MLIAPModelQuadratic::MLIAPModelQuadratic(LAMMPS* lmp, char* coefffilename) : nonlinearflag = 1; } -/* ---------------------------------------------------------------------- */ - -MLIAPModelQuadratic::~MLIAPModelQuadratic() {} - /* ---------------------------------------------------------------------- get number of parameters ---------------------------------------------------------------------- */ diff --git a/src/ML-IAP/mliap_model_quadratic.h b/src/ML-IAP/mliap_model_quadratic.h index c183178339..74234066c8 100644 --- a/src/ML-IAP/mliap_model_quadratic.h +++ b/src/ML-IAP/mliap_model_quadratic.h @@ -21,7 +21,7 @@ namespace LAMMPS_NS { class MLIAPModelQuadratic : public MLIAPModelSimple { public: MLIAPModelQuadratic(LAMMPS *, char * = nullptr); - ~MLIAPModelQuadratic(); + ~MLIAPModelQuadratic() = default; virtual int get_nparams(); virtual int get_gamma_nnz(class MLIAPData *); virtual void compute_gradients(class MLIAPData *); diff --git a/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp b/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp index 43e2fb15e4..6d013c5f7c 100644 --- a/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp @@ -41,10 +41,6 @@ PairLJCutCoulCutDielectricOMP::PairLJCutCoulCutDielectricOMP(LAMMPS *lmp) : /* ---------------------------------------------------------------------- */ -PairLJCutCoulCutDielectricOMP::~PairLJCutCoulCutDielectricOMP() {} - -/* ---------------------------------------------------------------------- */ - void PairLJCutCoulCutDielectricOMP::compute(int eflag, int vflag) { ev_init(eflag, vflag); diff --git a/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.h b/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.h index 093d0a8a42..5f28aa4d17 100644 --- a/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.h +++ b/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class PairLJCutCoulCutDielectricOMP : public PairLJCutCoulCutDielectric, public ThrOMP { public: PairLJCutCoulCutDielectricOMP(class LAMMPS *); - virtual ~PairLJCutCoulCutDielectricOMP(); + virtual ~PairLJCutCoulCutDielectricOMP() = default; virtual void compute(int, int); protected: diff --git a/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp b/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp index 6aa79e18a5..c076501d68 100644 --- a/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp @@ -47,10 +47,6 @@ PairLJCutCoulLongDielectricOMP::PairLJCutCoulLongDielectricOMP(LAMMPS *lmp) : /* ---------------------------------------------------------------------- */ -PairLJCutCoulLongDielectricOMP::~PairLJCutCoulLongDielectricOMP() {} - -/* ---------------------------------------------------------------------- */ - void PairLJCutCoulLongDielectricOMP::compute(int eflag, int vflag) { ev_init(eflag, vflag); diff --git a/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.h b/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.h index 0d13c4a92e..f70809524f 100644 --- a/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.h +++ b/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.h @@ -29,7 +29,7 @@ class PairLJCutCoulLongDielectricOMP : public PairLJCutCoulLongDielectric, publi public: PairLJCutCoulLongDielectricOMP(class LAMMPS *); - virtual ~PairLJCutCoulLongDielectricOMP(); + virtual ~PairLJCutCoulLongDielectricOMP() = default; virtual void compute(int, int); protected: diff --git a/src/OPENMP/pair_lubricate_omp.cpp b/src/OPENMP/pair_lubricate_omp.cpp index 0233ea5a06..f2df1b3ee8 100644 --- a/src/OPENMP/pair_lubricate_omp.cpp +++ b/src/OPENMP/pair_lubricate_omp.cpp @@ -47,11 +47,6 @@ PairLubricateOMP::PairLubricateOMP(LAMMPS *lmp) : /* ---------------------------------------------------------------------- */ -PairLubricateOMP::~PairLubricateOMP() -{} - -/* ---------------------------------------------------------------------- */ - void PairLubricateOMP::compute(int eflag, int vflag) { ev_init(eflag,vflag); diff --git a/src/OPENMP/pair_lubricate_omp.h b/src/OPENMP/pair_lubricate_omp.h index 27dbe73dd8..1f5fc340bb 100644 --- a/src/OPENMP/pair_lubricate_omp.h +++ b/src/OPENMP/pair_lubricate_omp.h @@ -33,7 +33,7 @@ class PairLubricateOMP : public PairLubricate, public ThrOMP { public: PairLubricateOMP(class LAMMPS *); - virtual ~PairLubricateOMP(); + virtual ~PairLubricateOMP() = default; virtual void compute(int, int); virtual double memory_usage(); diff --git a/src/OPENMP/pair_lubricate_poly_omp.cpp b/src/OPENMP/pair_lubricate_poly_omp.cpp index d3ad6b926c..669b964c73 100644 --- a/src/OPENMP/pair_lubricate_poly_omp.cpp +++ b/src/OPENMP/pair_lubricate_poly_omp.cpp @@ -47,11 +47,6 @@ PairLubricatePolyOMP::PairLubricatePolyOMP(LAMMPS *lmp) : /* ---------------------------------------------------------------------- */ -PairLubricatePolyOMP::~PairLubricatePolyOMP() -{} - -/* ---------------------------------------------------------------------- */ - void PairLubricatePolyOMP::compute(int eflag, int vflag) { ev_init(eflag,vflag); diff --git a/src/OPENMP/pair_lubricate_poly_omp.h b/src/OPENMP/pair_lubricate_poly_omp.h index 7fdfed6c62..5a36d232b8 100644 --- a/src/OPENMP/pair_lubricate_poly_omp.h +++ b/src/OPENMP/pair_lubricate_poly_omp.h @@ -33,7 +33,7 @@ class PairLubricatePolyOMP : public PairLubricatePoly, public ThrOMP { public: PairLubricatePolyOMP(class LAMMPS *); - virtual ~PairLubricatePolyOMP(); + virtual ~PairLubricatePolyOMP() = default; virtual void compute(int, int); virtual double memory_usage(); diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index 9731a447a6..74f7aaaf77 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -53,10 +53,6 @@ PairSpin::PairSpin(LAMMPS *lmp) : Pair(lmp), emag(nullptr) lattice_flag = 0; } -/* ---------------------------------------------------------------------- */ - -PairSpin::~PairSpin() {} - /* ---------------------------------------------------------------------- global settings ------------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin.h b/src/SPIN/pair_spin.h index 91262cdb5d..a9341bcb71 100644 --- a/src/SPIN/pair_spin.h +++ b/src/SPIN/pair_spin.h @@ -23,7 +23,7 @@ class PairSpin : public Pair { public: PairSpin(class LAMMPS *); - virtual ~PairSpin(); + virtual ~PairSpin() = default; virtual void settings(int, char **); virtual void coeff(int, char **) {} virtual void init_style(); diff --git a/src/lmppython.cpp b/src/lmppython.cpp index b7e65d1f02..daebf23c23 100644 --- a/src/lmppython.cpp +++ b/src/lmppython.cpp @@ -38,10 +38,6 @@ Python::~Python() /* ---------------------------------------------------------------------- */ -PythonInterface::~PythonInterface() {} - -/* ---------------------------------------------------------------------- */ - void Python::init() { #if defined(LMP_PYTHON) diff --git a/src/lmppython.h b/src/lmppython.h index 7ecee915e5..3f0ebecae5 100644 --- a/src/lmppython.h +++ b/src/lmppython.h @@ -20,7 +20,7 @@ namespace LAMMPS_NS { class PythonInterface { public: - virtual ~PythonInterface(); + virtual ~PythonInterface() = default; virtual void command(int, char **) = 0; virtual void invoke_function(int, char *) = 0; virtual int find(const char *) = 0; diff --git a/src/table_file_reader.cpp b/src/table_file_reader.cpp index bcd4e91886..bfbd466ae8 100644 --- a/src/table_file_reader.cpp +++ b/src/table_file_reader.cpp @@ -30,9 +30,6 @@ TableFileReader::TableFileReader(LAMMPS *lmp, { } -TableFileReader::~TableFileReader() { -} - char *TableFileReader::find_section_start(const std::string &keyword) { char *line = nullptr; while ((line = reader->next_line())) { diff --git a/src/table_file_reader.h b/src/table_file_reader.h index 643e1ce93c..832e68a34f 100644 --- a/src/table_file_reader.h +++ b/src/table_file_reader.h @@ -25,7 +25,7 @@ class TableFileReader : public PotentialFileReader { public: TableFileReader(class LAMMPS *lmp, const std::string &filename, const std::string &type, const int auto_convert = 0); - virtual ~TableFileReader(); + virtual ~TableFileReader() = default; char *find_section_start(const std::string &keyword); }; diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 71b4ad610e..95aa175fdf 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -198,9 +198,6 @@ std::vector Tokenizer::as_vector() { ValueTokenizer::ValueTokenizer(const std::string &str, const std::string &separators) : tokens(str, separators) { } -ValueTokenizer::ValueTokenizer(const ValueTokenizer &rhs) : tokens(rhs.tokens) { -} - ValueTokenizer::ValueTokenizer(ValueTokenizer &&rhs) : tokens(std::move(rhs.tokens)) { } diff --git a/src/tokenizer.h b/src/tokenizer.h index ad4f0d3536..cacfc541a4 100644 --- a/src/tokenizer.h +++ b/src/tokenizer.h @@ -97,7 +97,7 @@ class ValueTokenizer { public: ValueTokenizer(const std::string &str, const std::string &separators = TOKENIZER_DEFAULT_SEPARATORS); - ValueTokenizer(const ValueTokenizer &); + ValueTokenizer(const ValueTokenizer &) = default; ValueTokenizer(ValueTokenizer &&); ValueTokenizer &operator=(const ValueTokenizer &); ValueTokenizer &operator=(ValueTokenizer &&); diff --git a/unittest/c-library/test_library_commands.cpp b/unittest/c-library/test_library_commands.cpp index 6c52232a8e..267ee6108e 100644 --- a/unittest/c-library/test_library_commands.cpp +++ b/unittest/c-library/test_library_commands.cpp @@ -19,8 +19,8 @@ const char *cont_input[] = {"create_atoms 1 single &", "0.2 0.1 0.1"}; class LibraryCommands : public ::testing::Test { protected: void *lmp; - LibraryCommands(){}; - ~LibraryCommands() override{}; + LibraryCommands() = default; + ~LibraryCommands() override = default; void SetUp() override { @@ -31,7 +31,7 @@ protected: int argc = sizeof(args) / sizeof(char *); ::testing::internal::CaptureStdout(); - lmp = lammps_open_no_mpi(argc, argv, NULL); + lmp = lammps_open_no_mpi(argc, argv, nullptr); std::string output = ::testing::internal::GetCapturedStdout(); if (verbose) std::cout << output; EXPECT_THAT(output, StartsWith("LAMMPS (")); diff --git a/unittest/c-library/test_library_config.cpp b/unittest/c-library/test_library_config.cpp index e5eb044d31..456faff06f 100644 --- a/unittest/c-library/test_library_config.cpp +++ b/unittest/c-library/test_library_config.cpp @@ -22,8 +22,8 @@ protected: void *lmp; std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER); - LibraryConfig(){}; - ~LibraryConfig() override{}; + LibraryConfig() = default; + ~LibraryConfig() override = default; void SetUp() override { @@ -35,7 +35,7 @@ protected: int argc = sizeof(args) / sizeof(char *); ::testing::internal::CaptureStdout(); - lmp = lammps_open_no_mpi(argc, argv, NULL); + lmp = lammps_open_no_mpi(argc, argv, nullptr); lammps_command(lmp, "fix charge all property/atom q ghost yes"); lammps_command(lmp, "region box block 0 1 0 1 0 1"); lammps_command(lmp, "create_box 1 box"); diff --git a/unittest/c-library/test_library_external.cpp b/unittest/c-library/test_library_external.cpp index 15edd5f113..57d3bef080 100644 --- a/unittest/c-library/test_library_external.cpp +++ b/unittest/c-library/test_library_external.cpp @@ -69,7 +69,7 @@ TEST(lammps_external, callback) int argc = sizeof(args) / sizeof(char *); ::testing::internal::CaptureStdout(); - void *handle = lammps_open_no_mpi(argc, argv, NULL); + void *handle = lammps_open_no_mpi(argc, argv, nullptr); std::string output = ::testing::internal::GetCapturedStdout(); if (verbose) std::cout << output; @@ -136,7 +136,7 @@ TEST(lammps_external, array) int argc = sizeof(args) / sizeof(char *); ::testing::internal::CaptureStdout(); - void *handle = lammps_open_no_mpi(argc, argv, NULL); + void *handle = lammps_open_no_mpi(argc, argv, nullptr); std::string output = ::testing::internal::GetCapturedStdout(); if (verbose) std::cout << output; diff --git a/unittest/c-library/test_library_open.cpp b/unittest/c-library/test_library_open.cpp index b7a8016a1a..c75fd3738b 100644 --- a/unittest/c-library/test_library_open.cpp +++ b/unittest/c-library/test_library_open.cpp @@ -18,7 +18,7 @@ using ::testing::StartsWith; TEST(lammps_open, null_args) { ::testing::internal::CaptureStdout(); - void *handle = lammps_open(0, NULL, MPI_COMM_WORLD, NULL); + void *handle = lammps_open(0, nullptr, MPI_COMM_WORLD, nullptr); std::string output = ::testing::internal::GetCapturedStdout(); EXPECT_THAT(output, StartsWith("LAMMPS (")); if (verbose) std::cout << output; @@ -175,7 +175,7 @@ TEST(lammps_open_fortran, no_args) MPI_Comm_split(MPI_COMM_WORLD, 0, 1, &mycomm); int fcomm = MPI_Comm_c2f(mycomm); ::testing::internal::CaptureStdout(); - void *handle = lammps_open_fortran(0, NULL, fcomm); + void *handle = lammps_open_fortran(0, nullptr, fcomm); std::string output = ::testing::internal::GetCapturedStdout(); EXPECT_THAT(output, StartsWith("LAMMPS (")); if (verbose) std::cout << output; diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index 57c0153c65..754c6df77f 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -23,8 +23,8 @@ protected: void *lmp; std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER); - LibraryProperties(){}; - ~LibraryProperties() override{}; + LibraryProperties() = default; + ~LibraryProperties() override = default; void SetUp() override { @@ -36,7 +36,7 @@ protected: int argc = sizeof(args) / sizeof(char *); ::testing::internal::CaptureStdout(); - lmp = lammps_open_no_mpi(argc, argv, NULL); + lmp = lammps_open_no_mpi(argc, argv, nullptr); std::string output = ::testing::internal::GetCapturedStdout(); if (verbose) std::cout << output; EXPECT_THAT(output, StartsWith("LAMMPS (")); @@ -436,8 +436,8 @@ class AtomProperties : public ::testing::Test { protected: void *lmp; - AtomProperties(){}; - ~AtomProperties() override{}; + AtomProperties()= default;; + ~AtomProperties() override= default;; void SetUp() override { @@ -447,7 +447,7 @@ protected: int argc = sizeof(args) / sizeof(char *); ::testing::internal::CaptureStdout(); - lmp = lammps_open_no_mpi(argc, argv, NULL); + lmp = lammps_open_no_mpi(argc, argv, nullptr); std::string output = ::testing::internal::GetCapturedStdout(); if (verbose) std::cout << output; EXPECT_THAT(output, StartsWith("LAMMPS (")); diff --git a/unittest/c-library/test_library_scatter_gather.cpp b/unittest/c-library/test_library_scatter_gather.cpp index 34022f617e..7ee1cfc9eb 100644 --- a/unittest/c-library/test_library_scatter_gather.cpp +++ b/unittest/c-library/test_library_scatter_gather.cpp @@ -23,8 +23,8 @@ protected: void *lmp; std::string INPUT_DIR = STRINGIFY(TEST_INPUT_FOLDER); - GatherProperties(){}; - ~GatherProperties() override{}; + GatherProperties() = default; + ~GatherProperties() override = default; void SetUp() override { @@ -36,7 +36,7 @@ protected: int argc = sizeof(args) / sizeof(char *); ::testing::internal::CaptureStdout(); - lmp = lammps_open_no_mpi(argc, argv, NULL); + lmp = lammps_open_no_mpi(argc, argv, nullptr); std::string output = ::testing::internal::GetCapturedStdout(); if (verbose) std::cout << output; EXPECT_THAT(output, StartsWith("LAMMPS (")); diff --git a/unittest/cplusplus/test_input_class.cpp b/unittest/cplusplus/test_input_class.cpp index db11a91d88..4af7450ed8 100644 --- a/unittest/cplusplus/test_input_class.cpp +++ b/unittest/cplusplus/test_input_class.cpp @@ -29,7 +29,7 @@ protected: MPI_Initialized(&flag); if (!flag) MPI_Init(&argc, &argv); } - ~Input_commands() override {} + ~Input_commands() override = default; void SetUp() override {