aboutsummaryrefslogtreecommitdiff
path: root/osp
diff options
context:
space:
mode:
authorJordan Bayles <jophba@chromium.org>2019-09-16 14:38:01 -0700
committerCommit Bot <commit-bot@chromium.org>2019-09-16 22:00:40 +0000
commit262bad9cd0a379ba7ab51e68811c2ad8f78e937e (patch)
treef9835e427b87a1fe9152dab05d3257c8277fd74c /osp
parentce236ee9c93a7de27ba5f2f6ac740f39cf2ae549 (diff)
downloadopenscreen-262bad9cd0a379ba7ab51e68811c2ad8f78e937e.tar.gz
Add noexcept operators to move constructors
Change-Id: I3e2a395391b5c7fea88c8c04034012f0a53a5576 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1807611 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Max Yakimakha <yakimakha@chromium.org>
Diffstat (limited to 'osp')
-rw-r--r--osp/impl/discovery/mdns/domain_name.cc2
-rw-r--r--osp/impl/discovery/mdns/domain_name.h4
-rw-r--r--osp/impl/discovery/mdns/mdns_responder_adapter.cc20
-rw-r--r--osp/impl/discovery/mdns/mdns_responder_adapter.h20
-rw-r--r--osp/impl/quic/quic_client.cc4
-rw-r--r--osp/impl/quic/quic_client.h4
-rw-r--r--osp/impl/quic/quic_service_common.cc5
-rw-r--r--osp/impl/quic/quic_service_common.h8
-rw-r--r--osp/impl/receiver_list.h4
-rw-r--r--osp/public/message_demuxer.h4
-rw-r--r--osp/public/presentation/presentation_controller.h4
11 files changed, 40 insertions, 39 deletions
diff --git a/osp/impl/discovery/mdns/domain_name.cc b/osp/impl/discovery/mdns/domain_name.cc
index ece54851..03c89ca1 100644
--- a/osp/impl/discovery/mdns/domain_name.cc
+++ b/osp/impl/discovery/mdns/domain_name.cc
@@ -48,7 +48,7 @@ DomainName::DomainName(std::vector<uint8_t>&& domain_name)
OSP_CHECK_LE(domain_name_.size(), kDomainNameMaxLength);
}
DomainName::DomainName(const DomainName&) = default;
-DomainName::DomainName(DomainName&&) = default;
+DomainName::DomainName(DomainName&&) noexcept = default;
DomainName::~DomainName() = default;
DomainName& DomainName::operator=(const DomainName& domain_name) = default;
DomainName& DomainName::operator=(DomainName&& domain_name) = default;
diff --git a/osp/impl/discovery/mdns/domain_name.h b/osp/impl/discovery/mdns/domain_name.h
index 20efe0c8..7a5e6314 100644
--- a/osp/impl/discovery/mdns/domain_name.h
+++ b/osp/impl/discovery/mdns/domain_name.h
@@ -52,10 +52,10 @@ struct DomainName {
DomainName();
explicit DomainName(std::vector<uint8_t>&& domain_name);
DomainName(const DomainName&);
- DomainName(DomainName&&);
+ DomainName(DomainName&&) noexcept;
~DomainName();
DomainName& operator=(const DomainName&);
- DomainName& operator=(DomainName&&);
+ DomainName& operator=(DomainName&&) noexcept;
bool operator==(const DomainName& other) const;
bool operator!=(const DomainName& other) const;
diff --git a/osp/impl/discovery/mdns/mdns_responder_adapter.cc b/osp/impl/discovery/mdns/mdns_responder_adapter.cc
index a393d40e..9adb2c3f 100644
--- a/osp/impl/discovery/mdns/mdns_responder_adapter.cc
+++ b/osp/impl/discovery/mdns/mdns_responder_adapter.cc
@@ -21,25 +21,25 @@ AEvent::AEvent(const QueryEventHeader& header,
DomainName domain_name,
const IPAddress& address)
: header(header), domain_name(std::move(domain_name)), address(address) {}
-AEvent::AEvent(AEvent&&) = default;
+AEvent::AEvent(AEvent&&) noexcept = default;
AEvent::~AEvent() = default;
-AEvent& AEvent::operator=(AEvent&&) = default;
+AEvent& AEvent::operator=(AEvent&&) noexcept = default;
AaaaEvent::AaaaEvent() = default;
AaaaEvent::AaaaEvent(const QueryEventHeader& header,
DomainName domain_name,
const IPAddress& address)
: header(header), domain_name(std::move(domain_name)), address(address) {}
-AaaaEvent::AaaaEvent(AaaaEvent&&) = default;
+AaaaEvent::AaaaEvent(AaaaEvent&&) noexcept = default;
AaaaEvent::~AaaaEvent() = default;
-AaaaEvent& AaaaEvent::operator=(AaaaEvent&&) = default;
+AaaaEvent& AaaaEvent::operator=(AaaaEvent&&) noexcept = default;
PtrEvent::PtrEvent() = default;
PtrEvent::PtrEvent(const QueryEventHeader& header, DomainName service_instance)
: header(header), service_instance(std::move(service_instance)) {}
-PtrEvent::PtrEvent(PtrEvent&&) = default;
+PtrEvent::PtrEvent(PtrEvent&&) noexcept = default;
PtrEvent::~PtrEvent() = default;
-PtrEvent& PtrEvent::operator=(PtrEvent&&) = default;
+PtrEvent& PtrEvent::operator=(PtrEvent&&) noexcept = default;
SrvEvent::SrvEvent() = default;
SrvEvent::SrvEvent(const QueryEventHeader& header,
@@ -50,9 +50,9 @@ SrvEvent::SrvEvent(const QueryEventHeader& header,
service_instance(std::move(service_instance)),
domain_name(std::move(domain_name)),
port(port) {}
-SrvEvent::SrvEvent(SrvEvent&&) = default;
+SrvEvent::SrvEvent(SrvEvent&&) noexcept = default;
SrvEvent::~SrvEvent() = default;
-SrvEvent& SrvEvent::operator=(SrvEvent&&) = default;
+SrvEvent& SrvEvent::operator=(SrvEvent&&) noexcept = default;
TxtEvent::TxtEvent() = default;
TxtEvent::TxtEvent(const QueryEventHeader& header,
@@ -61,9 +61,9 @@ TxtEvent::TxtEvent(const QueryEventHeader& header,
: header(header),
service_instance(std::move(service_instance)),
txt_info(std::move(txt_info)) {}
-TxtEvent::TxtEvent(TxtEvent&&) = default;
+TxtEvent::TxtEvent(TxtEvent&&) noexcept = default;
TxtEvent::~TxtEvent() = default;
-TxtEvent& TxtEvent::operator=(TxtEvent&&) = default;
+TxtEvent& TxtEvent::operator=(TxtEvent&&) noexcept = default;
MdnsResponderAdapter::MdnsResponderAdapter() = default;
MdnsResponderAdapter::~MdnsResponderAdapter() = default;
diff --git a/osp/impl/discovery/mdns/mdns_responder_adapter.h b/osp/impl/discovery/mdns/mdns_responder_adapter.h
index 9b48936b..ca3cc7d4 100644
--- a/osp/impl/discovery/mdns/mdns_responder_adapter.h
+++ b/osp/impl/discovery/mdns/mdns_responder_adapter.h
@@ -42,9 +42,9 @@ struct QueryEventHeader {
struct PtrEvent {
PtrEvent();
PtrEvent(const QueryEventHeader& header, DomainName service_instance);
- PtrEvent(PtrEvent&&);
+ PtrEvent(PtrEvent&&) noexcept;
~PtrEvent();
- PtrEvent& operator=(PtrEvent&&);
+ PtrEvent& operator=(PtrEvent&&) noexcept;
QueryEventHeader header;
DomainName service_instance;
@@ -56,9 +56,9 @@ struct SrvEvent {
DomainName service_instance,
DomainName domain_name,
uint16_t port);
- SrvEvent(SrvEvent&&);
+ SrvEvent(SrvEvent&&) noexcept;
~SrvEvent();
- SrvEvent& operator=(SrvEvent&&);
+ SrvEvent& operator=(SrvEvent&&) noexcept;
QueryEventHeader header;
DomainName service_instance;
@@ -71,9 +71,9 @@ struct TxtEvent {
TxtEvent(const QueryEventHeader& header,
DomainName service_instance,
std::vector<std::string> txt_info);
- TxtEvent(TxtEvent&&);
+ TxtEvent(TxtEvent&&) noexcept;
~TxtEvent();
- TxtEvent& operator=(TxtEvent&&);
+ TxtEvent& operator=(TxtEvent&&) noexcept;
QueryEventHeader header;
DomainName service_instance;
@@ -88,9 +88,9 @@ struct AEvent {
AEvent(const QueryEventHeader& header,
DomainName domain_name,
const IPAddress& address);
- AEvent(AEvent&&);
+ AEvent(AEvent&&) noexcept;
~AEvent();
- AEvent& operator=(AEvent&&);
+ AEvent& operator=(AEvent&&) noexcept;
QueryEventHeader header;
DomainName domain_name;
@@ -102,9 +102,9 @@ struct AaaaEvent {
AaaaEvent(const QueryEventHeader& header,
DomainName domain_name,
const IPAddress& address);
- AaaaEvent(AaaaEvent&&);
+ AaaaEvent(AaaaEvent&&) noexcept;
~AaaaEvent();
- AaaaEvent& operator=(AaaaEvent&&);
+ AaaaEvent& operator=(AaaaEvent&&) noexcept;
QueryEventHeader header;
DomainName domain_name;
diff --git a/osp/impl/quic/quic_client.cc b/osp/impl/quic/quic_client.cc
index ce193071..7c4fcc47 100644
--- a/osp/impl/quic/quic_client.cc
+++ b/osp/impl/quic/quic_client.cc
@@ -168,10 +168,10 @@ QuicClient::PendingConnectionData::PendingConnectionData(
ServiceConnectionData&& data)
: data(std::move(data)) {}
QuicClient::PendingConnectionData::PendingConnectionData(
- PendingConnectionData&&) = default;
+ PendingConnectionData&&) noexcept = default;
QuicClient::PendingConnectionData::~PendingConnectionData() = default;
QuicClient::PendingConnectionData& QuicClient::PendingConnectionData::operator=(
- PendingConnectionData&&) = default;
+ PendingConnectionData&&) noexcept = default;
QuicClient::ConnectRequest QuicClient::CreatePendingConnection(
const IPEndpoint& endpoint,
diff --git a/osp/impl/quic/quic_client.h b/osp/impl/quic/quic_client.h
index f819ae46..b192dbe4 100644
--- a/osp/impl/quic/quic_client.h
+++ b/osp/impl/quic/quic_client.h
@@ -70,9 +70,9 @@ class QuicClient final : public ProtocolConnectionClient,
private:
struct PendingConnectionData {
explicit PendingConnectionData(ServiceConnectionData&& data);
- PendingConnectionData(PendingConnectionData&&);
+ PendingConnectionData(PendingConnectionData&&) noexcept;
~PendingConnectionData();
- PendingConnectionData& operator=(PendingConnectionData&&);
+ PendingConnectionData& operator=(PendingConnectionData&&) noexcept;
ServiceConnectionData data;
diff --git a/osp/impl/quic/quic_service_common.cc b/osp/impl/quic/quic_service_common.cc
index 115407b8..1bc26fea 100644
--- a/osp/impl/quic/quic_service_common.cc
+++ b/osp/impl/quic/quic_service_common.cc
@@ -157,9 +157,10 @@ ServiceConnectionData::ServiceConnectionData(
std::unique_ptr<QuicConnection> connection,
std::unique_ptr<ServiceConnectionDelegate> delegate)
: connection(std::move(connection)), delegate(std::move(delegate)) {}
-ServiceConnectionData::ServiceConnectionData(ServiceConnectionData&&) = default;
+ServiceConnectionData::ServiceConnectionData(ServiceConnectionData&&) noexcept =
+ default;
ServiceConnectionData::~ServiceConnectionData() = default;
ServiceConnectionData& ServiceConnectionData::operator=(
- ServiceConnectionData&&) = default;
+ ServiceConnectionData&&) noexcept = default;
} // namespace openscreen
diff --git a/osp/impl/quic/quic_service_common.h b/osp/impl/quic/quic_service_common.h
index d4644845..61367e7f 100644
--- a/osp/impl/quic/quic_service_common.h
+++ b/osp/impl/quic/quic_service_common.h
@@ -56,8 +56,8 @@ struct ServiceStreamPair {
ServiceStreamPair(std::unique_ptr<QuicStream> stream,
QuicProtocolConnection* protocol_connection);
~ServiceStreamPair();
- ServiceStreamPair(ServiceStreamPair&&);
- ServiceStreamPair& operator=(ServiceStreamPair&&);
+ ServiceStreamPair(ServiceStreamPair&&) noexcept;
+ ServiceStreamPair& operator=(ServiceStreamPair&&) noexcept;
std::unique_ptr<QuicStream> stream;
uint64_t connection_id;
@@ -127,9 +127,9 @@ struct ServiceConnectionData {
explicit ServiceConnectionData(
std::unique_ptr<QuicConnection> connection,
std::unique_ptr<ServiceConnectionDelegate> delegate);
- ServiceConnectionData(ServiceConnectionData&&);
+ ServiceConnectionData(ServiceConnectionData&&) noexcept;
~ServiceConnectionData();
- ServiceConnectionData& operator=(ServiceConnectionData&&);
+ ServiceConnectionData& operator=(ServiceConnectionData&&) noexcept;
std::unique_ptr<QuicConnection> connection;
std::unique_ptr<ServiceConnectionDelegate> delegate;
diff --git a/osp/impl/receiver_list.h b/osp/impl/receiver_list.h
index 8387768e..f7758d16 100644
--- a/osp/impl/receiver_list.h
+++ b/osp/impl/receiver_list.h
@@ -16,8 +16,8 @@ class ReceiverList {
public:
ReceiverList();
~ReceiverList();
- ReceiverList(ReceiverList&&) = delete;
- ReceiverList& operator=(ReceiverList&&) = delete;
+ ReceiverList(ReceiverList&&) noexcept = delete;
+ ReceiverList& operator=(ReceiverList&&) noexcept = delete;
void OnReceiverAdded(const ServiceInfo& info);
diff --git a/osp/public/message_demuxer.h b/osp/public/message_demuxer.h
index 5ff38c34..87e4feaf 100644
--- a/osp/public/message_demuxer.h
+++ b/osp/public/message_demuxer.h
@@ -47,9 +47,9 @@ class MessageDemuxer {
bool is_default,
uint64_t endpoint_id,
msgs::Type message_type);
- MessageWatch(MessageWatch&&);
+ MessageWatch(MessageWatch&&) noexcept;
~MessageWatch();
- MessageWatch& operator=(MessageWatch&&);
+ MessageWatch& operator=(MessageWatch&&) noexcept;
explicit operator bool() const { return parent_; }
diff --git a/osp/public/presentation/presentation_controller.h b/osp/public/presentation/presentation_controller.h
index 309c86f1..563427e8 100644
--- a/osp/public/presentation/presentation_controller.h
+++ b/osp/public/presentation/presentation_controller.h
@@ -58,7 +58,7 @@ class Controller final : public ServiceListener::Observer,
ReceiverWatch(Controller* controller,
const std::vector<std::string>& urls,
ReceiverObserver* observer);
- ReceiverWatch(ReceiverWatch&&);
+ ReceiverWatch(ReceiverWatch&&) noexcept;
~ReceiverWatch();
ReceiverWatch& operator=(ReceiverWatch);
@@ -80,7 +80,7 @@ class Controller final : public ServiceListener::Observer,
const std::string& service_id,
bool is_reconnect,
absl::optional<uint64_t> request_id);
- ConnectRequest(ConnectRequest&&);
+ ConnectRequest(ConnectRequest&&) noexcept;
~ConnectRequest();
ConnectRequest& operator=(ConnectRequest);