Port to C++ delete keyword
Performed using modernize-use-equals-delete from clang-tidy. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-delete.htmltime-shift
parent
197cbea919
commit
7df31f68d9
|
@ -357,6 +357,7 @@ namespace ogp
|
||||||
}
|
}
|
||||||
VarOrdering(const VarOrdering &vo, const vector<const char *> &vnames,
|
VarOrdering(const VarOrdering &vo, const vector<const char *> &vnames,
|
||||||
const DynamicAtoms &a);
|
const DynamicAtoms &a);
|
||||||
|
VarOrdering(const VarOrdering &vo) = delete;
|
||||||
virtual VarOrdering *clone(const vector<const char *> &vnames,
|
virtual VarOrdering *clone(const vector<const char *> &vnames,
|
||||||
const DynamicAtoms &a) const = 0;
|
const DynamicAtoms &a) const = 0;
|
||||||
/** Destructor does nothing here. */
|
/** Destructor does nothing here. */
|
||||||
|
@ -462,9 +463,6 @@ namespace ogp
|
||||||
* from the least to the most time preserving the order of atoms
|
* from the least to the most time preserving the order of atoms
|
||||||
* within one time. */
|
* within one time. */
|
||||||
void do_increasing_time();
|
void do_increasing_time();
|
||||||
private:
|
|
||||||
/** Declare this copy constructor as private to hide it. */
|
|
||||||
VarOrdering(const VarOrdering &vo);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -158,6 +158,7 @@ namespace ogp
|
||||||
: atoms(a)
|
: atoms(a)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
FormulaParser(const FormulaParser &fp) = delete;
|
||||||
/** Copy constructor using a different instance of Atoms. */
|
/** Copy constructor using a different instance of Atoms. */
|
||||||
FormulaParser(const FormulaParser &fp, Atoms &a);
|
FormulaParser(const FormulaParser &fp, Atoms &a);
|
||||||
virtual
|
virtual
|
||||||
|
@ -295,9 +296,6 @@ namespace ogp
|
||||||
/** Debug print. */
|
/** Debug print. */
|
||||||
void print() const;
|
void print() const;
|
||||||
private:
|
private:
|
||||||
/** Hide this copy constructor declaration by declaring it as
|
|
||||||
* private. */
|
|
||||||
FormulaParser(const FormulaParser &fp);
|
|
||||||
/** Destroy all derivatives. */
|
/** Destroy all derivatives. */
|
||||||
void destroy_derivatives();
|
void destroy_derivatives();
|
||||||
};
|
};
|
||||||
|
|
|
@ -403,6 +403,7 @@ namespace ogp
|
||||||
* will contain only formulas up to the given last index
|
* will contain only formulas up to the given last index
|
||||||
* (included). */
|
* (included). */
|
||||||
EvalTree(const OperationTree &otree, int last = -1);
|
EvalTree(const OperationTree &otree, int last = -1);
|
||||||
|
EvalTree(const EvalTree &) = delete;
|
||||||
virtual ~EvalTree()
|
virtual ~EvalTree()
|
||||||
{
|
{
|
||||||
delete [] values; delete [] flags;
|
delete [] values; delete [] flags;
|
||||||
|
@ -422,8 +423,6 @@ namespace ogp
|
||||||
{
|
{
|
||||||
return otree;
|
return otree;
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
EvalTree(const EvalTree &);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This is an interface describing how a given operation is
|
/** This is an interface describing how a given operation is
|
||||||
|
|
|
@ -47,6 +47,7 @@ namespace ogdyn
|
||||||
* function. This will save us many occurrences of other
|
* function. This will save us many occurrences of other
|
||||||
* variables involved in the equation. */
|
* variables involved in the equation. */
|
||||||
ForwSubstBuilder(DynareModel &m);
|
ForwSubstBuilder(DynareModel &m);
|
||||||
|
ForwSubstBuilder(const ForwSubstBuilder &b) = delete;
|
||||||
/** Copy constructor with a new instance of the model. */
|
/** Copy constructor with a new instance of the model. */
|
||||||
ForwSubstBuilder(const ForwSubstBuilder &b, DynareModel &m);
|
ForwSubstBuilder(const ForwSubstBuilder &b, DynareModel &m);
|
||||||
/** Return the auxiliary variable mapping. */
|
/** Return the auxiliary variable mapping. */
|
||||||
|
@ -62,7 +63,6 @@ namespace ogdyn
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
ForwSubstBuilder(const ForwSubstBuilder &b);
|
|
||||||
/** This method takes a nonlinear term t, and if it has leads
|
/** This method takes a nonlinear term t, and if it has leads
|
||||||
* of greater than 1, then it substitutes the term for the new
|
* of greater than 1, then it substitutes the term for the new
|
||||||
* variable (or string of variables). Note that the
|
* variable (or string of variables). Note that the
|
||||||
|
|
|
@ -234,6 +234,8 @@ namespace ogdyn
|
||||||
/** Construct a copy of the builder with provided model, which
|
/** Construct a copy of the builder with provided model, which
|
||||||
* is supposed to be the copy of the model in the builder. */
|
* is supposed to be the copy of the model in the builder. */
|
||||||
PlannerBuilder(const PlannerBuilder &pb, ogdyn::DynareModel &m);
|
PlannerBuilder(const PlannerBuilder &pb, ogdyn::DynareModel &m);
|
||||||
|
/** Avoid copying from only PlannerBuilder. */
|
||||||
|
PlannerBuilder(const PlannerBuilder &pb) = delete;
|
||||||
/** Return the information. */
|
/** Return the information. */
|
||||||
const PlannerInfo &
|
const PlannerInfo &
|
||||||
get_info() const
|
get_info() const
|
||||||
|
@ -272,8 +274,6 @@ namespace ogdyn
|
||||||
* aux_map_static. */
|
* aux_map_static. */
|
||||||
void fill_aux_map(const ogp::NameStorage &ns, const Tsubstmap &aaux_map,
|
void fill_aux_map(const ogp::NameStorage &ns, const Tsubstmap &aaux_map,
|
||||||
const Tsubstmap &astatic_aux_map);
|
const Tsubstmap &astatic_aux_map);
|
||||||
/** Avoid copying from only PlannerBuilder. */
|
|
||||||
PlannerBuilder(const PlannerBuilder &pb);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This class only calculates for the given initial guess of
|
/** This class only calculates for the given initial guess of
|
||||||
|
|
|
@ -33,10 +33,10 @@ class SylvMemoryPool
|
||||||
size_t length{0};
|
size_t length{0};
|
||||||
size_t allocated{0};
|
size_t allocated{0};
|
||||||
bool stack_mode{false};
|
bool stack_mode{false};
|
||||||
SylvMemoryPool(const SylvMemoryPool &);
|
|
||||||
const SylvMemoryPool &operator=(const SylvMemoryPool &);
|
|
||||||
public:
|
public:
|
||||||
SylvMemoryPool();
|
SylvMemoryPool();
|
||||||
|
SylvMemoryPool(const SylvMemoryPool &) = delete;
|
||||||
|
const SylvMemoryPool &operator=(const SylvMemoryPool &) = delete;
|
||||||
~SylvMemoryPool();
|
~SylvMemoryPool();
|
||||||
void init(size_t size);
|
void init(size_t size);
|
||||||
void *allocate(size_t size);
|
void *allocate(size_t size);
|
||||||
|
@ -47,11 +47,11 @@ public:
|
||||||
|
|
||||||
class SylvMemoryDriver
|
class SylvMemoryDriver
|
||||||
{
|
{
|
||||||
SylvMemoryDriver(const SylvMemoryDriver &);
|
|
||||||
const SylvMemoryDriver &operator=(const SylvMemoryDriver &);
|
|
||||||
public:
|
public:
|
||||||
SylvMemoryDriver(int num_d, int m, int n, int order);
|
SylvMemoryDriver(int num_d, int m, int n, int order);
|
||||||
SylvMemoryDriver(const SylvParams &pars, int num_d, int m, int n, int order);
|
SylvMemoryDriver(const SylvParams &pars, int num_d, int m, int n, int order);
|
||||||
|
SylvMemoryDriver(const SylvMemoryDriver &) = delete;
|
||||||
|
const SylvMemoryDriver &operator=(const SylvMemoryDriver &) = delete;
|
||||||
static void setStackMode(bool);
|
static void setStackMode(bool);
|
||||||
~SylvMemoryDriver();
|
~SylvMemoryDriver();
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -101,6 +101,7 @@ class IrregTensorHeader
|
||||||
IntSequence end_seq;
|
IntSequence end_seq;
|
||||||
public:
|
public:
|
||||||
IrregTensorHeader(const StackProduct<FGSTensor> &sp, const IntSequence &c);
|
IrregTensorHeader(const StackProduct<FGSTensor> &sp, const IntSequence &c);
|
||||||
|
IrregTensorHeader(const IrregTensorHeader &) = delete;
|
||||||
~IrregTensorHeader();
|
~IrregTensorHeader();
|
||||||
int
|
int
|
||||||
dimen() const
|
dimen() const
|
||||||
|
@ -109,8 +110,6 @@ public:
|
||||||
}
|
}
|
||||||
void increment(IntSequence &v) const;
|
void increment(IntSequence &v) const;
|
||||||
int calcMaxOffset() const;
|
int calcMaxOffset() const;
|
||||||
private:
|
|
||||||
IrregTensorHeader(const IrregTensorHeader &);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Here we declare the irregular tensor. There is no special logic
|
/* Here we declare the irregular tensor. There is no special logic
|
||||||
|
|
Loading…
Reference in New Issue