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