-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,13 @@ InterpolationTable& operator=( const InterpolationTable& base ) { | |
|
||
if ( this != &base ) { | ||
|
||
new (this) InterpolationTable( base ); | ||
Parent::operator=( base ); | ||
this->x_ = base.x_; | ||
this->y_ = base.y_; | ||
this->boundaries_ = base.boundaries_; | ||
this->interpolants_ = base.interpolants_; | ||
this->linearised_ = base.linearised_; | ||
this->generateTables(); | ||
} | ||
return *this; | ||
} | ||
|
@@ -54,7 +60,13 @@ InterpolationTable& operator=( InterpolationTable&& base ) { | |
|
||
if ( this != &base ) { | ||
|
||
new (this) InterpolationTable( std::move( base ) ); | ||
Parent::operator=( std::move( base ) ); | ||
this->x_ = std::move( base.x_ ); | ||
this->y_ = std::move( base.y_ ); | ||
this->boundaries_ = std::move( base.boundaries_ ); | ||
this->interpolants_ = std::move( base.interpolants_ ); | ||
this->linearised_ = std::move( base.linearised_ ); | ||
this->generateTables(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
whaeck
Author
Member
|
||
} | ||
return *this; | ||
} | ||
|
I'm a little confused about the call to gererateTables and the call move linearised_. tables_ exists in base and was already constructed. Why not just move/copy it?
this->linearised_ is a bool. Might be better just to copy it?