From 2854c6d34f046b81165371f65b98d096502aa121 Mon Sep 17 00:00:00 2001 From: Nathan Young <92858834+TactfulDeity@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:17:45 -0500 Subject: [PATCH] static analysis clean up Signed-off-by: Nathan Young <92858834+TactfulDeity@users.noreply.github.com> --- avogadro/core/basisset.h | 6 ++++-- avogadro/core/residue.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/avogadro/core/basisset.h b/avogadro/core/basisset.h index 5a07d2634f..b8cf5985ec 100644 --- a/avogadro/core/basisset.h +++ b/avogadro/core/basisset.h @@ -7,7 +7,9 @@ #define AVOGADRO_CORE_BASISSET_H #include "avogadrocoreexport.h" +#include "core/variant.h" +#include #include namespace Avogadro::Core { @@ -138,14 +140,14 @@ class AVOGADROCORE_EXPORT BasisSet * For closed shell calculations alpha is doubly occupied and there are no * beta electrons. */ - unsigned int m_electrons[2]; + std::array m_electrons = {}; /** * The Molecule holds the atoms (and possibly bonds) read in from the output * file. Most basis sets have orbitals around these atoms, but this is not * necessarily the case. */ - Molecule* m_molecule; + Molecule* m_molecule = nullptr; /** * The name of the basis set, this is usually a string identifier referencing diff --git a/avogadro/core/residue.h b/avogadro/core/residue.h index c0e59eafd8..f69df66eae 100644 --- a/avogadro/core/residue.h +++ b/avogadro/core/residue.h @@ -10,6 +10,7 @@ #include "avogadrocore.h" +#include #include #include @@ -133,7 +134,7 @@ class AVOGADROCORE_EXPORT Residue protected: std::string m_residueName; - Index m_residueId; + Index m_residueId = std::numeric_limits::max(); char m_chainId; AtomNameMap m_atomNameMap; bool m_heterogen;