remove declarations of copy/assignment operators that only do default work

user defined copy operators suppress compiler creation of move operations, and not having all of copy/move/dtor
defined (rule of 0/5) is suspicious. Also happens to be very slightly slower
This commit is contained in:
JCrawfy 2020-03-01 23:16:57 +13:00
parent 39f498f401
commit 932fc4596f
4 changed files with 0 additions and 39 deletions

View File

@ -92,26 +92,11 @@ public:
/// </summary> /// </summary>
column_t(const char *column_string); column_t(const char *column_string);
/// <summary>
/// Copy constructor. Constructs a column by copying it from other.
/// </summary>
column_t(const column_t &other);
/// <summary>
/// Move constructor. Constructs a column by moving it from other.
/// </summary>
column_t(column_t &&other);
/// <summary> /// <summary>
/// Returns a string representation of this column index. /// Returns a string representation of this column index.
/// </summary> /// </summary>
std::string column_string() const; std::string column_string() const;
/// <summary>
/// Sets this column to be the same as rhs's and return reference to self.
/// </summary>
column_t &operator=(column_t rhs);
/// <summary> /// <summary>
/// Sets this column to be equal to rhs and return reference to self. /// Sets this column to be equal to rhs and return reference to self.
/// </summary> /// </summary>

View File

@ -69,8 +69,6 @@ public:
range_reference(column_t column_index_start, row_t row_index_start, range_reference(column_t column_index_start, row_t row_index_start,
column_t column_index_end, row_t row_index_end); column_t column_index_end, row_t row_index_end);
range_reference(const range_reference &ref);
/// <summary> /// <summary>
/// Returns true if the range has a width and height of 1 cell. /// Returns true if the range has a width and height of 1 cell.
/// </summary> /// </summary>

View File

@ -109,27 +109,11 @@ column_t::column_t(const char *column_string)
{ {
} }
column_t::column_t(const column_t &other)
: column_t(other.index)
{
}
column_t::column_t(column_t &&other)
{
swap(*this, other);
}
std::string column_t::column_string() const std::string column_t::column_string() const
{ {
return column_string_from_index(index); return column_string_from_index(index);
} }
column_t &column_t::operator=(column_t rhs)
{
swap(*this, rhs);
return *this;
}
column_t &column_t::operator=(const std::string &rhs) column_t &column_t::operator=(const std::string &rhs)
{ {
return *this = column_t(rhs); return *this = column_t(rhs);

View File

@ -46,12 +46,6 @@ range_reference::range_reference(const char *range_string)
{ {
} }
range_reference::range_reference(const range_reference &ref)
{
top_left_ = ref.top_left_;
bottom_right_ = ref.bottom_right_;
}
range_reference::range_reference(const std::string &range_string) range_reference::range_reference(const std::string &range_string)
: top_left_("A1"), bottom_right_("A1") : top_left_("A1"), bottom_right_("A1")
{ {