A few more modernizations with clang-tidy
parent
e45d230a3d
commit
a8f12c5b76
|
@ -4,8 +4,7 @@
|
|||
#include "symmetry.hh"
|
||||
|
||||
prodpit::prodpit()
|
||||
: prodq(nullptr), jseq(nullptr),
|
||||
sig(nullptr), p(nullptr)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ class ProductQuadrature;
|
|||
class prodpit
|
||||
{
|
||||
protected:
|
||||
const ProductQuadrature *prodq;
|
||||
const ProductQuadrature *prodq{nullptr};
|
||||
int level{0};
|
||||
int npoints{0};
|
||||
IntSequence *jseq;
|
||||
IntSequence *jseq{nullptr};
|
||||
bool end_flag{true};
|
||||
ParameterSignal *sig;
|
||||
Vector *p;
|
||||
ParameterSignal *sig{nullptr};
|
||||
Vector *p{nullptr};
|
||||
double w;
|
||||
public:
|
||||
prodpit();
|
||||
|
|
|
@ -162,7 +162,7 @@ HaltonSequence::print() const
|
|||
}
|
||||
|
||||
qmcpit::qmcpit()
|
||||
: spec(nullptr), halton(nullptr), sig(nullptr)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ qmcpit::weight() const
|
|||
}
|
||||
|
||||
qmcnpit::qmcnpit()
|
||||
: qmcpit(), pnt(nullptr)
|
||||
: qmcpit()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -160,9 +160,9 @@ public:
|
|||
class qmcpit
|
||||
{
|
||||
protected:
|
||||
const QMCSpecification *spec;
|
||||
HaltonSequence *halton;
|
||||
ParameterSignal *sig;
|
||||
const QMCSpecification *spec{nullptr};
|
||||
HaltonSequence *halton{nullptr};
|
||||
ParameterSignal *sig{nullptr};
|
||||
public:
|
||||
qmcpit();
|
||||
qmcpit(const QMCSpecification &s, int n);
|
||||
|
@ -233,7 +233,7 @@ protected:
|
|||
class qmcnpit : public qmcpit
|
||||
{
|
||||
protected:
|
||||
Vector *pnt;
|
||||
Vector *pnt{nullptr};
|
||||
public:
|
||||
qmcnpit();
|
||||
qmcnpit(const QMCSpecification &spec, int n);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "symmetry.hh"
|
||||
|
||||
smolpit::smolpit()
|
||||
: smolq(nullptr), jseq(nullptr), sig(nullptr), p(nullptr)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@ class SmolyakQuadrature;
|
|||
class smolpit
|
||||
{
|
||||
protected:
|
||||
const SmolyakQuadrature *smolq;
|
||||
const SmolyakQuadrature *smolq{nullptr};
|
||||
unsigned int isummand{0};
|
||||
IntSequence *jseq;
|
||||
ParameterSignal *sig;
|
||||
Vector *p;
|
||||
IntSequence *jseq{nullptr};
|
||||
ParameterSignal *sig{nullptr};
|
||||
Vector *p{nullptr};
|
||||
double w;
|
||||
public:
|
||||
smolpit();
|
||||
|
|
|
@ -22,9 +22,8 @@ AtomSubstitutions::AtomSubstitutions(const AtomSubstitutions &as, const FineAtom
|
|||
for (const auto & it : as.old2new)
|
||||
{
|
||||
Tshiftnameset sset;
|
||||
for (auto itt = it.second.begin();
|
||||
itt != it.second.end(); ++itt)
|
||||
sset.insert(Tshiftname(ns.query((*itt).first), (*itt).second));
|
||||
for (const auto & itt : it.second)
|
||||
sset.insert(Tshiftname(ns.query(itt.first), itt.second));
|
||||
old2new.insert(Toldnamemap::value_type(ns.query(it.first), sset));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,14 +201,14 @@ namespace ogp
|
|||
* to endogenous variables. It is constructed by
|
||||
* parsing_finished() method, which should be called after all
|
||||
* parsing jobs have been finished. */
|
||||
VarOrdering *endo_order;
|
||||
VarOrdering *endo_order{nullptr};
|
||||
/** This is the internal ordering of all atoms corresponding
|
||||
* to exogenous variables. It has the same handling as
|
||||
* endo_order. */
|
||||
VarOrdering *exo_order;
|
||||
VarOrdering *exo_order{nullptr};
|
||||
/** This is the all variables outer ordering. It is
|
||||
* constructed by parsing finished. */
|
||||
AllvarOuterOrdering *allvar_order;
|
||||
AllvarOuterOrdering *allvar_order{nullptr};
|
||||
/** This vector defines a set of atoms as tree indices used
|
||||
* for differentiation. The order of the atoms in this vector
|
||||
* defines ordering of the derivative tensors. The ordering is
|
||||
|
@ -229,9 +229,8 @@ namespace ogp
|
|||
vector<int> exo_atoms_map;
|
||||
public:
|
||||
FineAtoms()
|
||||
: endo_order(nullptr), exo_order(nullptr), allvar_order(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
= default;
|
||||
FineAtoms(const FineAtoms &fa);
|
||||
/** Deletes endo_order and exo_order. */
|
||||
~FineAtoms() override
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace ogp
|
|||
friend class MatrixParser;
|
||||
protected:
|
||||
/** Reference to the matrix parser. */
|
||||
const MatrixParser *p;
|
||||
const MatrixParser *p{nullptr};
|
||||
/** The index of the pointed item in the matrix parser. */
|
||||
unsigned int i{0};
|
||||
/** The column number of the pointed item starting from zero. */
|
||||
|
@ -91,9 +91,8 @@ namespace ogp
|
|||
int r{0};
|
||||
|
||||
public:
|
||||
MPIterator() : p(nullptr)
|
||||
{
|
||||
}
|
||||
MPIterator()
|
||||
= default;
|
||||
/** Constructs an iterator pointing to the beginning of the
|
||||
* parsed matrix. */
|
||||
MPIterator(const MatrixParser &mp);
|
||||
|
|
|
@ -26,9 +26,7 @@ ParsedMatrix::ParsedMatrix(const ogp::MatrixParser &mp)
|
|||
}
|
||||
|
||||
DynareModel::DynareModel()
|
||||
: atoms(), eqs(atoms),
|
||||
pbuilder(nullptr), fbuilder(nullptr),
|
||||
atom_substs(nullptr), old_atoms(nullptr)
|
||||
: atoms(), eqs(atoms)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -98,19 +98,19 @@ namespace ogdyn
|
|||
int t_pldiscount{-1};
|
||||
/** Pointer to PlannerBuilder, which is created only if the
|
||||
* planner's FOC are added to the model. */
|
||||
PlannerBuilder *pbuilder;
|
||||
PlannerBuilder *pbuilder{nullptr};
|
||||
/** Pointer to an object which builds auxiliary variables and
|
||||
* equations to rewrite a model containing multiple leads to
|
||||
* an equivalent model having only +1 leads. */
|
||||
ForwSubstBuilder *fbuilder;
|
||||
ForwSubstBuilder *fbuilder{nullptr};
|
||||
/** Pointer to AtomSubstitutions which are created when the
|
||||
* atoms are being substituted because of multiple lags
|
||||
* etc. It uses also an old copy of atoms, which is
|
||||
* created. */
|
||||
ogp::AtomSubstitutions *atom_substs;
|
||||
ogp::AtomSubstitutions *atom_substs{nullptr};
|
||||
/** Pointer to a copy of original atoms before substitutions
|
||||
* took place. */
|
||||
ogp::SAtoms *old_atoms;
|
||||
ogp::SAtoms *old_atoms{nullptr};
|
||||
public:
|
||||
/** Initializes the object to an empty state. */
|
||||
DynareModel();
|
||||
|
|
Loading…
Reference in New Issue