From 82844d01972601d50f99bd5af1ab8e79b16442b1 Mon Sep 17 00:00:00 2001 From: John Parejko Date: Thu, 26 Sep 2024 15:38:05 -0700 Subject: [PATCH] Remove unnecessary move constructors --- include/lsst/afw/table/BaseTable.h | 3 +-- include/lsst/afw/table/Exposure.h | 1 - include/lsst/afw/table/Simple.h | 1 - include/lsst/afw/table/Source.h | 1 - src/table/Exposure.cc | 4 +--- src/table/Simple.cc | 2 -- src/table/Source.cc | 4 +--- 7 files changed, 3 insertions(+), 13 deletions(-) diff --git a/include/lsst/afw/table/BaseTable.h b/include/lsst/afw/table/BaseTable.h index b0457063cb..6b9892f1cc 100644 --- a/include/lsst/afw/table/BaseTable.h +++ b/include/lsst/afw/table/BaseTable.h @@ -216,8 +216,7 @@ class BaseTable : public std::enable_shared_from_this { explicit BaseTable(Schema const& schema, std::shared_ptr metadata = nullptr); BaseTable(BaseTable const& other); - // Delegate to copy-constructor for backwards compatibility - BaseTable(BaseTable&& other) : BaseTable(other) {} + BaseTable(BaseTable&& other) = delete; private: friend class BaseRecord; diff --git a/include/lsst/afw/table/Exposure.h b/include/lsst/afw/table/Exposure.h index 66a1c58ed8..307f83b88e 100644 --- a/include/lsst/afw/table/Exposure.h +++ b/include/lsst/afw/table/Exposure.h @@ -269,7 +269,6 @@ class ExposureTable : public BaseTable { explicit ExposureTable(Schema const& schema); ExposureTable(ExposureTable const& other); - ExposureTable(ExposureTable&& other); std::shared_ptr _clone() const override; diff --git a/include/lsst/afw/table/Simple.h b/include/lsst/afw/table/Simple.h index 2b67cbca4c..1ea220bc37 100644 --- a/include/lsst/afw/table/Simple.h +++ b/include/lsst/afw/table/Simple.h @@ -198,7 +198,6 @@ class SimpleTable : public BaseTable { SimpleTable(Schema const& schema, std::shared_ptr const& idFactory); explicit SimpleTable(SimpleTable const& other); - explicit SimpleTable(SimpleTable&& other); std::shared_ptr _clone() const override; diff --git a/include/lsst/afw/table/Source.h b/include/lsst/afw/table/Source.h index 47d0e01db8..b32c54f6e4 100644 --- a/include/lsst/afw/table/Source.h +++ b/include/lsst/afw/table/Source.h @@ -388,7 +388,6 @@ class SourceTable : public SimpleTable { SourceTable(Schema const &schema, std::shared_ptr const &idFactory); SourceTable(SourceTable const &other); - SourceTable(SourceTable &&other); void handleAliasChange(std::string const &alias) override; diff --git a/src/table/Exposure.cc b/src/table/Exposure.cc index db0b890d23..21c234a1ef 100644 --- a/src/table/Exposure.cc +++ b/src/table/Exposure.cc @@ -404,9 +404,7 @@ std::shared_ptr ExposureTable::make(Schema const &schema) { ExposureTable::ExposureTable(Schema const &schema) : BaseTable(schema) {} -ExposureTable::ExposureTable(ExposureTable const &other) = default; -// Delegate to copy-constructor for backward compatibility -ExposureTable::ExposureTable(ExposureTable &&other) : ExposureTable(other) {} +ExposureTable::ExposureTable(ExposureTable const &other) = default; ExposureTable::~ExposureTable() = default; diff --git a/src/table/Simple.cc b/src/table/Simple.cc index 6bac3c021d..4fb6a39cd8 100644 --- a/src/table/Simple.cc +++ b/src/table/Simple.cc @@ -88,8 +88,6 @@ SimpleTable::SimpleTable(Schema const& schema, std::shared_ptr const& SimpleTable::SimpleTable(SimpleTable const& other) : BaseTable(other), _idFactory(other._idFactory ? other._idFactory->clone() : other._idFactory) {} -// Delegate to copy constructor for backwards compatibility -SimpleTable::SimpleTable(SimpleTable&& other) : SimpleTable(other) {} SimpleTable::~SimpleTable() = default; diff --git a/src/table/Source.cc b/src/table/Source.cc index b3eb3034c1..5ca84a338f 100644 --- a/src/table/Source.cc +++ b/src/table/Source.cc @@ -411,9 +411,7 @@ std::shared_ptr SourceTable::make(Schema const &schema, SourceTable::SourceTable(Schema const &schema, std::shared_ptr const &idFactory) : SimpleTable(schema, idFactory), _slots(schema) {} -SourceTable::SourceTable(SourceTable const &other) = default; -// Delegate to copy constructor for backward compatibility -SourceTable::SourceTable(SourceTable &&other) : SourceTable(other) {} +SourceTable::SourceTable(SourceTable const &other) = default; void SourceTable::handleAliasChange(std::string const &alias) { if (alias.compare(0, 4, "slot") != 0) {