Skip to content

Commit

Permalink
HermitianMatrix: Drop copy ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Oct 31, 2024
1 parent fd795dd commit 4467ec6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
22 changes: 0 additions & 22 deletions lib/src/Base/Type/HermitianMatrix.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ CLASSNAMEINIT(HermitianMatrix)
/* Default constructor */
HermitianMatrix::HermitianMatrix()
: SquareComplexMatrix(0)
, hasBeenHermitianized_(false)
{
// Nothing to do
}
Expand All @@ -41,7 +40,6 @@ HermitianMatrix::HermitianMatrix()
/* Constructor with size (dim, which is the same for nbRows_ and nbColumns_ )*/
HermitianMatrix::HermitianMatrix(const UnsignedInteger dimension)
: SquareComplexMatrix(dimension, dimension)
, hasBeenHermitianized_(false)
{
// Nothing to do
}
Expand All @@ -50,30 +48,10 @@ HermitianMatrix::HermitianMatrix(const UnsignedInteger dimension)
/* Constructor with implementation */
HermitianMatrix::HermitianMatrix(const Implementation & i)
: SquareComplexMatrix(i)
, hasBeenHermitianized_(false)
{
// Nothing to do
}

/* Copy constructor, added to solve glitches with inheritance */
HermitianMatrix::HermitianMatrix(const HermitianMatrix & h)
: SquareComplexMatrix(static_cast<const SquareComplexMatrix &>(h))
, hasBeenHermitianized_(false)
{
// Nothing to do
}

/* Assignment operator */
HermitianMatrix & HermitianMatrix::operator=(const HermitianMatrix & rhs)
{
if (this != &rhs)
{
SquareComplexMatrix::operator=(rhs);
hasBeenHermitianized_ = rhs.hasBeenHermitianized_;
}
return *this;
}

/* String converter */
String HermitianMatrix::__repr__() const
{
Expand Down
10 changes: 1 addition & 9 deletions lib/src/Base/Type/openturns/HermitianMatrix.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ public:
/** Constructor with implementation */
HermitianMatrix(const Implementation & i);

#ifndef SWIG
/** Copy constructor, added to solve glitches with inheritance */
HermitianMatrix(const HermitianMatrix & other);

/** Assignment operator */
HermitianMatrix & operator=(const HermitianMatrix & rhs);
#endif

/** String converter */
String __repr__() const override;
String __str__(const String & offset = "") const override;
Expand Down Expand Up @@ -179,7 +171,7 @@ public:
private:

/** Check if one needs to symmetrized the internal representation of the tensor */
mutable Bool hasBeenHermitianized_;
mutable Bool hasBeenHermitianized_ = false;

}

Expand Down

0 comments on commit 4467ec6

Please sign in to comment.