Commit 9656904d authored by Sébastien Villemot's avatar Sébastien Villemot

Port to C++11 nullptr keyword

Performed using modernize-use-nullptr from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
parent 7df31f68
......@@ -4,8 +4,8 @@
#include "symmetry.hh"
prodpit::prodpit()
: prodq(NULL), jseq(NULL),
sig(NULL), p(NULL)
: prodq(nullptr), jseq(nullptr),
sig(nullptr), p(nullptr)
{
}
......@@ -33,15 +33,15 @@ prodpit::prodpit(const prodpit &ppit)
if (ppit.jseq)
jseq = new IntSequence(*(ppit.jseq));
else
jseq = NULL;
jseq = nullptr;
if (ppit.sig)
sig = new ParameterSignal(*(ppit.sig));
else
sig = NULL;
sig = nullptr;
if (ppit.p)
p = new Vector(*(ppit.p));
else
p = NULL;
p = nullptr;
}
prodpit::~prodpit()
......@@ -60,8 +60,8 @@ prodpit::operator==(const prodpit &ppit) const
bool ret = true;
ret = ret & prodq == ppit.prodq;
ret = ret & end_flag == ppit.end_flag;
ret = ret & ((jseq == NULL && ppit.jseq == NULL)
|| (jseq != NULL && ppit.jseq != NULL && *jseq == *(ppit.jseq)));
ret = ret & ((jseq == nullptr && ppit.jseq == nullptr)
|| (jseq != nullptr && ppit.jseq != nullptr && *jseq == *(ppit.jseq)));
return ret;
}
......@@ -82,15 +82,15 @@ prodpit::operator=(const prodpit &ppit)
if (ppit.jseq)
jseq = new IntSequence(*(ppit.jseq));
else
jseq = NULL;
jseq = nullptr;
if (ppit.sig)
sig = new ParameterSignal(*(ppit.sig));
else
sig = NULL;
sig = nullptr;
if (ppit.p)
p = new Vector(*(ppit.p));
else
p = NULL;
p = nullptr;
return *this;
}
......
......@@ -188,7 +188,7 @@ public:
savePoints(const char *fname, int level) const
{
FILE *fd;
if (NULL == (fd = fopen(fname, "w")))
if (nullptr == (fd = fopen(fname, "w")))
{
// todo: raise
fprintf(stderr, "Cannot open file %s for writing.\n", fname);
......
......@@ -162,7 +162,7 @@ HaltonSequence::print() const
}
qmcpit::qmcpit()
: spec(NULL), halton(NULL), sig(NULL)
: spec(nullptr), halton(nullptr), sig(nullptr)
{
}
......@@ -173,7 +173,7 @@ qmcpit::qmcpit(const QMCSpecification &s, int n)
}
qmcpit::qmcpit(const qmcpit &qpit)
: spec(qpit.spec), halton(NULL), sig(NULL)
: spec(qpit.spec), halton(nullptr), sig(nullptr)
{
if (qpit.halton)
halton = new HaltonSequence(*(qpit.halton));
......@@ -193,8 +193,8 @@ bool
qmcpit::operator==(const qmcpit &qpit) const
{
return (spec == qpit.spec)
&& ((halton == NULL && qpit.halton == NULL)
|| (halton != NULL && qpit.halton != NULL && halton->getNum() == qpit.halton->getNum()));
&& ((halton == nullptr && qpit.halton == nullptr)
|| (halton != nullptr && qpit.halton != nullptr && halton->getNum() == qpit.halton->getNum()));
}
const qmcpit &
......@@ -206,7 +206,7 @@ qmcpit::operator=(const qmcpit &qpit)
if (qpit.halton)
halton = new HaltonSequence(*(qpit.halton));
else
halton = NULL;
halton = nullptr;
return *this;
}
......@@ -225,7 +225,7 @@ qmcpit::weight() const
}
qmcnpit::qmcnpit()
: qmcpit(), pnt(NULL)
: qmcpit(), pnt(nullptr)
{
}
......@@ -235,7 +235,7 @@ qmcnpit::qmcnpit(const QMCSpecification &s, int n)
}
qmcnpit::qmcnpit(const qmcnpit &qpit)
: qmcpit(qpit), pnt(NULL)
: qmcpit(qpit), pnt(nullptr)
{
if (qpit.pnt)
pnt = new Vector(*(qpit.pnt));
......@@ -256,7 +256,7 @@ qmcnpit::operator=(const qmcnpit &qpit)
if (qpit.pnt)
pnt = new Vector(*(qpit.pnt));
else
pnt = NULL;
pnt = nullptr;
return *this;
}
......
......@@ -4,7 +4,7 @@
#include "symmetry.hh"
smolpit::smolpit()
: smolq(NULL), jseq(NULL), sig(NULL), p(NULL)
: smolq(nullptr), jseq(nullptr), sig(nullptr), p(nullptr)
{
}
......@@ -28,15 +28,15 @@ smolpit::smolpit(const smolpit &spit)
if (spit.jseq)
jseq = new IntSequence(*(spit.jseq));
else
jseq = NULL;
jseq = nullptr;
if (spit.sig)
sig = new ParameterSignal(*(spit.sig));
else
sig = NULL;
sig = nullptr;
if (spit.p)
p = new Vector(*(spit.p));
else
p = NULL;
p = nullptr;
}
smolpit::~smolpit()
......@@ -55,8 +55,8 @@ smolpit::operator==(const smolpit &spit) const
bool ret = true;
ret = ret & smolq == spit.smolq;
ret = ret & isummand == spit.isummand;
ret = ret & ((jseq == NULL && spit.jseq == NULL)
|| (jseq != NULL && spit.jseq != NULL && *jseq == *(spit.jseq)));
ret = ret & ((jseq == nullptr && spit.jseq == nullptr)
|| (jseq != nullptr && spit.jseq != nullptr && *jseq == *(spit.jseq)));
return ret;
}
......@@ -77,15 +77,15 @@ smolpit::operator=(const smolpit &spit)
if (spit.jseq)
jseq = new IntSequence(*(spit.jseq));
else
jseq = NULL;
jseq = nullptr;
if (spit.sig)
sig = new ParameterSignal(*(spit.sig));
else
sig = NULL;
sig = nullptr;
if (spit.p)
p = new Vector(*(spit.p));
else
p = NULL;
p = nullptr;
return *this;
}
......
......@@ -29,7 +29,7 @@ private:
};
QuadParams::QuadParams(int argc, char **argv)
: outname(NULL), vcovname(NULL), max_level(3), discard_weight(0.0)
: outname(nullptr), vcovname(nullptr), max_level(3), discard_weight(0.0)
{
if (argc == 1)
{
......@@ -41,10 +41,10 @@ QuadParams::QuadParams(int argc, char **argv)
argc--;
struct option const opts [] = {
{"max-level", required_argument, NULL, opt_max_level},
{"discard-weight", required_argument, NULL, opt_discard_weight},
{"vcov", required_argument, NULL, opt_vcov},
{NULL, 0, NULL, 0}
{"max-level", required_argument, nullptr, opt_max_level},
{"discard-weight", required_argument, nullptr, opt_discard_weight},
{"vcov", required_argument, nullptr, opt_vcov},
{nullptr, 0, nullptr, 0}
};
int ret;
......@@ -73,13 +73,13 @@ QuadParams::QuadParams(int argc, char **argv)
void
QuadParams::check_consistency() const
{
if (outname == NULL)
if (outname == nullptr)
{
fprintf(stderr, "Error: output name not set\n");
exit(1);
}
if (vcovname == NULL)
if (vcovname == nullptr)
{
fprintf(stderr, "Error: vcov file name not set\n");
exit(1);
......@@ -104,7 +104,7 @@ main(int argc, char **argv)
// open output file for writing
FILE *fout;
if (NULL == (fout = fopen(params.outname, "w")))
if (nullptr == (fout = fopen(params.outname, "w")))
{
fprintf(stderr, "Could not open %s for writing\n", params.outname);
exit(1);
......
......@@ -172,12 +172,12 @@ class WallTimer
public:
WallTimer(const char *m, bool nl = true)
{
strcpy(mes, m); new_line = nl; gettimeofday(&start, NULL);
strcpy(mes, m); new_line = nl; gettimeofday(&start, nullptr);
}
~WallTimer()
{
struct timeval end;
gettimeofday(&end, NULL);
gettimeofday(&end, nullptr);
printf("%s%8.4g", mes,
end.tv_sec-start.tv_sec + (end.tv_usec-start.tv_usec)*1.0e-6);
if (new_line)
......
......@@ -30,7 +30,7 @@ ZAuxContainer::getType(int i, const Symmetry &s) const
}
Approximation::Approximation(DynamicModel &m, Journal &j, int ns, bool dr_centr, double qz_crit)
: model(m), journal(j), rule_ders(NULL), rule_ders_ss(NULL), fdr(NULL), udr(NULL),
: model(m), journal(j), rule_ders(nullptr), rule_ders_ss(nullptr), fdr(nullptr), udr(nullptr),
ypart(model.nstat(), model.npred(), model.nboth(), model.nforw()),
mom(UNormalMoments(model.order(), model.getVcov())), nvs(4), steps(ns),
dr_centralize(dr_centr), qz_criterium(qz_crit), ss(ypart.ny(), steps+1)
......@@ -57,7 +57,7 @@ Approximation::~Approximation()
const FoldDecisionRule &
Approximation::getFoldDecisionRule() const
{
KORD_RAISE_IF(fdr == NULL,
KORD_RAISE_IF(fdr == nullptr,
"Folded decision rule has not been created in Approximation::getFoldDecisionRule");
return *fdr;
}
......@@ -66,7 +66,7 @@ Approximation::getFoldDecisionRule() const
const UnfoldDecisionRule &
Approximation::getUnfoldDecisionRule() const
{
KORD_RAISE_IF(udr == NULL,
KORD_RAISE_IF(udr == nullptr,
"Unfolded decision rule has not been created in Approximation::getUnfoldDecisionRule");
return *udr;
}
......@@ -208,12 +208,12 @@ Approximation::walkStochSteady()
if (fdr)
{
delete fdr;
fdr = NULL;
fdr = nullptr;
}
if (udr)
{
delete udr;
udr = NULL;
udr = nullptr;
}
fdr = new FoldDecisionRule(*rule_ders, ypart, model.nexog(),
......
......@@ -132,8 +132,8 @@ SimResults::writeMat(const char *base, const char *lname) const
{
char matfile_name[100];
sprintf(matfile_name, "%s.mat", base);
mat_t *matfd = Mat_Create(matfile_name, NULL);
if (matfd != NULL)
mat_t *matfd = Mat_Create(matfile_name, nullptr);
if (matfd != nullptr)
{
writeMat(matfd, lname);
Mat_Close(matfd);
......
......@@ -534,7 +534,7 @@ template <int t>
DRFixPoint<t>::DRFixPoint(const _Tg &g, const PartitionY &yp,
const Vector &ys, double sigma)
: ctraits<t>::Tpol(yp.ny(), yp.nys()),
ysteady(ys), ypart(yp), bigf(NULL), bigfder(NULL)
ysteady(ys), ypart(yp), bigf(nullptr), bigfder(nullptr)
{
fillTensors(g, sigma);
_Tparent yspol(ypart.nstat, ypart.nys(), *this);
......
......@@ -16,13 +16,13 @@
ResidFunction::ResidFunction(const Approximation &app)
: VectorFunction(app.getModel().nexog(), app.getModel().numeq()), approx(app),
model(app.getModel().clone()),
yplus(NULL), ystar(NULL), u(NULL), hss(NULL)
yplus(nullptr), ystar(nullptr), u(nullptr), hss(nullptr)
{
}
ResidFunction::ResidFunction(const ResidFunction &rf)
: VectorFunction(rf), approx(rf.approx), model(rf.model->clone()),
yplus(NULL), ystar(NULL), u(NULL), hss(NULL)
yplus(nullptr), ystar(nullptr), u(nullptr), hss(nullptr)
{
if (rf.yplus)
yplus = new Vector(*(rf.yplus));
......
......@@ -67,7 +67,7 @@ sysconf(int name)
SystemResources::SystemResources()
{
gettimeofday(&start, NULL);
gettimeofday(&start, nullptr);
}
long int
......@@ -103,7 +103,7 @@ SystemResources::getRUS(double &load_avg, long int &pg_avail,
long int &idrss, long int &majflt)
{
struct timeval now;
gettimeofday(&now, NULL);
gettimeofday(&now, nullptr);
elapsed = now.tv_sec-start.tv_sec + (now.tv_usec-start.tv_usec)*1.0e-6;
#if !defined(__MINGW32__)
......@@ -239,7 +239,7 @@ Journal::printHeader()
(*this)<< "\n\nStart time: ";
char ts[100];
time_t curtime = time(NULL);
time_t curtime = time(nullptr);
tm loctime;
localtime_r(&curtime, &loctime);
asctime_r(&loctime, ts);
......
......@@ -29,7 +29,7 @@ KOrderStoch::KOrderStoch(const PartitionY &yp, int nu,
const FGSContainer &hh, Journal &jr)
: nvs(4), ypart(yp), journal(jr),
_ug(4), _fg(4), _ugs(4), _fgs(4), _uG(4), _fG(4),
_uh(NULL), _fh(&hh),
_uh(nullptr), _fh(&hh),
_uZstack(&_uG, ypart.nyss(), &_ug, ypart.ny(), ypart.nys(), nu),
_fZstack(&_fG, ypart.nyss(), &_fg, ypart.ny(), ypart.nys(), nu),
_uGstack(&_ugs, ypart.nys(), nu),
......@@ -50,7 +50,7 @@ KOrderStoch::KOrderStoch(const PartitionY &yp, int nu,
const UGSContainer &hh, Journal &jr)
: nvs(4), ypart(yp), journal(jr),
_ug(4), _fg(4), _ugs(4), _fgs(4), _uG(4), _fG(4),
_uh(&hh), _fh(NULL),
_uh(&hh), _fh(nullptr),
_uZstack(&_uG, ypart.nyss(), &_ug, ypart.ny(), ypart.nys(), nu),
_fZstack(&_fG, ypart.nyss(), &_fg, ypart.ny(), ypart.nys(), nu),
_uGstack(&_ugs, ypart.nys(), nu),
......
......@@ -35,7 +35,7 @@ AtomSubstitutions::add_substitution(const char *newname, const char *oldname, in
// make sure the storage is from the new_atoms
newname = new_atoms.get_name_storage().query(newname);
oldname = new_atoms.get_name_storage().query(oldname);
if (newname == NULL || oldname == NULL)
if (newname == nullptr || oldname == nullptr)
throw ogu::Exception(__FILE__, __LINE__,
"Bad newname or oldname in AtomSubstitutions::add_substitution");
......@@ -88,7 +88,7 @@ AtomSubstitutions::get_new4old(const char *oldname, int tshift) const
if (itt.second == -tshift)
return itt.first;
}
return NULL;
return nullptr;
}
void
......@@ -114,19 +114,19 @@ SAtoms::substituteAllLagsAndLeads(FormulaParser &fp, AtomSubstitutions &as)
endovarspan(mlead, mlag);
// substitute all endo lagged more than 1
while (NULL != (name = findEndoWithLeadInInterval(mlag, -2)))
while (nullptr != (name = findEndoWithLeadInInterval(mlag, -2)))
makeAuxVariables(name, -1, -2, mlag, fp, as);
// substitute all endo leaded more than 1
while (NULL != (name = findEndoWithLeadInInterval(2, mlead)))
while (nullptr != (name = findEndoWithLeadInInterval(2, mlead)))
makeAuxVariables(name, 1, 2, mlead, fp, as);
exovarspan(mlead, mlag);
// substitute all lagged exo
while (NULL != (name = findExoWithLeadInInterval(mlag, -1)))
while (nullptr != (name = findExoWithLeadInInterval(mlag, -1)))
makeAuxVariables(name, -1, -1, mlag, fp, as);
// substitute all leaded exo
while (NULL != (name = findExoWithLeadInInterval(1, mlead)))
while (nullptr != (name = findExoWithLeadInInterval(1, mlead)))
makeAuxVariables(name, 1, 1, mlead, fp, as);
// notify that substitution have been finished
......@@ -142,16 +142,16 @@ SAtoms::substituteAllLagsAndExo1Leads(FormulaParser &fp, AtomSubstitutions &as)
endovarspan(mlead, mlag);
// substitute all endo lagged more than 1
while (NULL != (name = findEndoWithLeadInInterval(mlag, -2)))
while (nullptr != (name = findEndoWithLeadInInterval(mlag, -2)))
makeAuxVariables(name, -1, -2, mlag, fp, as);
exovarspan(mlead, mlag);
// substitute all lagged exo
while (NULL != (name = findExoWithLeadInInterval(mlag, -1)))
while (nullptr != (name = findExoWithLeadInInterval(mlag, -1)))
makeAuxVariables(name, -1, -1, mlag, fp, as);
// substitute all leaded exo by 1
while (NULL != (name = findExoWithLeadInInterval(1, 1)))
while (nullptr != (name = findExoWithLeadInInterval(1, 1)))
makeAuxVariables(name, 1, 1, 1, fp, as);
// notify that substitution have been finished
......@@ -175,7 +175,7 @@ SAtoms::findNameWithLeadInInterval(const vector<const char *> &names,
}
// nothing found
return NULL;
return nullptr;
}
void
......@@ -242,7 +242,7 @@ SAtoms::makeAuxVariables(const char *name, int step, int start, int limit_lead,
const char *newname;
string newname_str;
int taux;
if (NULL == (newname = as.get_new4old(name, ll-step)))
if (nullptr == (newname = as.get_new4old(name, ll-step)))
{
attemptAuxName(name, ll-step, newname_str);
newname = newname_str.c_str();
......
......@@ -40,5 +40,5 @@ CSVParser::csv_parse(int length, const char *str)
::csv_parse();
delete [] buffer;
csv__destroy_buffer(p);
parsed_string = NULL;
parsed_string = nullptr;
}
......@@ -25,7 +25,7 @@ namespace ogp
const char *parsed_string;
public:
CSVParser(CSVParserPeer &p)
: peer(p), row(0), col(0), parsed_string(0)
: peer(p), row(0), col(0), parsed_string(nullptr)
{
}
CSVParser(const CSVParser &csvp)
......
......@@ -32,7 +32,7 @@ NameStorage::query(const char *name) const
{
auto it = name_set.find(name);
if (it == name_set.end())
return NULL;
return nullptr;
else
return (*it);
}
......
......@@ -76,7 +76,7 @@ AllvarOuterOrdering::AllvarOuterOrdering(const AllvarOuterOrdering &avo,
FineAtoms::FineAtoms(const FineAtoms &fa)
: DynamicAtoms(fa), params(), endovars(), exovars(),
endo_order(NULL), exo_order(NULL), allvar_order(NULL),
endo_order(nullptr), exo_order(nullptr), allvar_order(nullptr),
der_atoms(fa.der_atoms),
endo_atoms_map(fa.endo_atoms_map),
exo_atoms_map(fa.exo_atoms_map)
......
......@@ -229,7 +229,7 @@ namespace ogp
vector<int> exo_atoms_map;
public:
FineAtoms()
: endo_order(NULL), exo_order(NULL), allvar_order(NULL)
: endo_order(nullptr), exo_order(nullptr), allvar_order(nullptr)
{
}
FineAtoms(const FineAtoms &fa);
......
......@@ -91,7 +91,7 @@ namespace ogp
int r{0};
public:
MPIterator() : p(NULL)
MPIterator() : p(nullptr)
{
}
/** Constructs an iterator pointing to the beginning of the
......
......@@ -48,7 +48,7 @@ ParserException::ParserException(const string &m, const char *dum, int i1, int i
}
ParserException::ParserException(const ParserException &m, int plus_offset)
: mes(NULL),
: mes(nullptr),
aux_i1(-1), aux_i2(-1), aux_i3(-1)
{
copy(m);
......@@ -56,7 +56,7 @@ ParserException::ParserException(const ParserException &m, int plus_offset)
}
ParserException::ParserException(const ParserException &m, const char *dum, int i)
: mes(NULL),
: mes(nullptr),
aux_i1(-1), aux_i2(-1), aux_i3(-1)
{
copy(m);
......@@ -66,7 +66,7 @@ ParserException::ParserException(const ParserException &m, const char *dum, int
}
ParserException::ParserException(const ParserException &m, const char *dum, int i1, int i2)
: mes(NULL),
: mes(nullptr),
aux_i1(-1), aux_i2(-1), aux_i3(-1)
{
copy(m);
......@@ -76,7 +76,7 @@ ParserException::ParserException(const ParserException &m, const char *dum, int
}
ParserException::ParserException(const ParserException &m, const char *dum, int i1, int i2, int i3)
: mes(NULL),
: mes(nullptr),
aux_i1(-1), aux_i2(-1), aux_i3(-1)
{
copy(m);
......@@ -86,7 +86,7 @@ ParserException::ParserException(const ParserException &m, const char *dum, int
}
ParserException::ParserException(const ParserException &e)
: mes(NULL),
: mes(nullptr),
aux_i1(-1), aux_i2(-1), aux_i3(-1)
{
copy(e);
......
......@@ -84,7 +84,7 @@ StaticAtoms::inv_index(int t) const
{
auto it = indices.find(t);
if (it == indices.end())
return NULL;
return nullptr;
else
return (*it).second;
}
......
......@@ -97,7 +97,7 @@ int
StaticFineAtoms::check_variable(const char *name) const
{
const char *ss = varnames.query(name);
if (ss == NULL)
if (ss == nullptr)
throw ParserException(string("Variable <")+name+"> not declared.", 0);
return index(name);
}
......@@ -208,7 +208,7 @@ void
StaticFineAtoms::register_endo(const char *name)
{
const char *ss = varnames.query(name);
if (ss == NULL)
if (ss == nullptr)
throw ogp::ParserException(string("Endogenous variable <")
+name+"> not found in storage.", 0);
endovars.push_back(ss);
......@@ -219,7 +219,7 @@ void
StaticFineAtoms::register_exo(const char *name)
{
const char *ss = varnames.query(name);
if (ss == NULL)
if (ss == nullptr)
throw ogp::ParserException(string("Exogenous variable <")
+name+"> not found in storage.", 0);
exovars.push_back(ss);
......@@ -230,7 +230,7 @@ void
StaticFineAtoms::register_param(const char *name)
{
const char *ss = varnames.query(name);
if (ss == NULL)
if (ss == nullptr)
throw ogp::ParserException(string("Parameter <")+name+"> not found in storage.", 0);
params.push_back(ss);
param_outer_map.insert(Tvarintmap::value_type(ss, params.size()-1));
......
......@@ -40,8 +40,8 @@ DynareNameList::selectIndices(const vector<const char *> &ns) const
/**************************************************************************************/
Dynare::Dynare(const char *modname, int ord, double sstol, Journal &jr)
: journal(jr), model(NULL), ysteady(NULL), md(1), dnl(NULL), denl(NULL), dsnl(NULL),
fe(NULL), fde(NULL), ss_tol(sstol)
: journal(jr), model(nullptr), ysteady(nullptr), md(1), dnl(nullptr), denl(nullptr), dsnl(nullptr),
fe(nullptr), fde(nullptr), ss_tol(sstol)
{
// make memory file
ogu::MemoryFile mf(modname);
......@@ -77,8 +77,8 @@ Dynare::Dynare(const char **endo, int num_endo,
const char **par, int num_par,
const char *equations, int len, int ord,
double sstol, Journal &jr)
: journal(jr), model(NULL), ysteady(NULL), md(1), dnl(NULL), denl(NULL), dsnl(NULL),
fe(NULL), fde(NULL), ss_tol(sstol)
: journal(jr), model(nullptr), ysteady(nullptr), md(1), dnl(nullptr), denl(nullptr), dsnl(nullptr),
fe(nullptr), fde(nullptr), ss_tol(sstol)
{
try
{
......@@ -99,9 +99,9 @@ Dynare::Dynare(const char **endo, int num_endo,
}
Dynare::Dynare(const Dynare &dynare)
: journal(dynare.journal), model(NULL),
ysteady(NULL), md(dynare.md),
dnl(NULL), denl(NULL), dsnl(NULL), fe(NULL), fde(NULL),
: journal(dynare.journal), model(nullptr),
ysteady(nullptr), md(dynare.md),
dnl(nullptr), denl(nullptr), dsnl(nullptr), fe(nullptr), fde(nullptr),
ss_tol(dynare.ss_tol)
{
model = dynare.model->clone();
......
......@@ -24,7 +24,7 @@ DynareStaticAtoms::register_name(const char *name)
int
DynareStaticAtoms::check_variable(const char *name) const
{
if (0 == varnames.query(name))
if (nullptr == varnames.query(name))
throw ogp::ParserException(std::string("Unknown name <")+name+">", 0);
auto it = vars.find(name);
if (it == vars.end())
......
......@@ -27,18 +27,18 @@ ParsedMatrix::ParsedMatrix(const ogp::MatrixParser &mp)
DynareModel::DynareModel()
: atoms(), eqs(atoms),
pbuilder(NULL), fbuilder(NULL),
atom_substs(NULL), old_atoms(NULL)
pbuilder(nullptr), fbuilder(nullptr),
atom_substs(nullptr), old_atoms(nullptr)
{
}
DynareModel::DynareModel(const DynareModel &dm)
: atoms(dm.atoms), eqs(dm.eqs, atoms), order(dm.order),
param_vals(0), init_vals(0), vcov_mat(0),
param_vals(nullptr), init_vals(nullptr), vcov_mat(nullptr),
t_plobjective(dm.t_plobjective),
t_pldiscount(dm.t_pldiscount),
pbuilder(NULL), fbuilder(NULL),
atom_substs(NULL), old_atoms(NULL)
pbuilder(nullptr), fbuilder(nullptr),
atom_substs(nullptr), old_atoms(nullptr)
{
if (dm.param_vals)
param_vals = new Vector((const Vector &) *(dm.param_vals));
......@@ -79,7 +79,7 @@ DynareModel::get_planner_info() const
{
if (pbuilder)
return &(pbuilder->get_info());
return NULL;
return nullptr;
}
const ForwSubstInfo *
......@@ -87,7 +87,7 @@ DynareModel::get_forw_subst_info() const
{
if (fbuilder)
return &(fbuilder->get_info());
return NULL;
return nullptr;
}
const ogp::SubstInfo *
......@@ -95,7 +95,7 @@ DynareModel::get_subst_info() const
{