diff options
author | mark a. foltz <mfoltz@chromium.org> | 2020-11-11 13:11:37 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-11 22:43:56 +0000 |
commit | d3ffc411d154c9dc803005873f3be8e4000a666d (patch) | |
tree | f2f97b902fc99e151ad28ddd5946d94cb2391fc5 /cast/streaming/receiver_session.h | |
parent | 7b6396aaef5bf0693c6b9aa2e4bdbe139a28e57a (diff) | |
download | openscreen-d3ffc411d154c9dc803005873f3be8e4000a666d.tar.gz |
[Open Screen] Fix noexcept usage.
This patch consistently annotates move constructors with noexcept. This
enables move optimization when std::vector is resized.
Notes:
- LLVM libcxx has been patched to no longer require this when
-fno-exceptions is used [1]
- However, libc++ still requires it as far as I can tell
- There are no compilation issues with noexcept on clang or GCC so
MAYBE_NOEXCEPT is no longer necessary
- noexcept is only meaningful on declarations, not definitions
Background: https://groups.google.com/a/chromium.org/g/chromium-dev/c/8i4tMqNpHhg
[1] https://github.com/llvm/llvm-project/commit/2a573784f3679a7abab921018eb1c585dce8e669
Bug: b/160731444
Change-Id: Ib83e5c2fa5a2624665b76a3b2e0f6351a9196f8f
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2533433
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
Diffstat (limited to 'cast/streaming/receiver_session.h')
-rw-r--r-- | cast/streaming/receiver_session.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cast/streaming/receiver_session.h b/cast/streaming/receiver_session.h index fc181960..92cb2810 100644 --- a/cast/streaming/receiver_session.h +++ b/cast/streaming/receiver_session.h @@ -89,7 +89,7 @@ class ReceiverSession final { Preferences(Preferences&&) noexcept; Preferences(const Preferences&) = delete; - Preferences& operator=(Preferences&&) noexcept; + Preferences& operator=(Preferences&&); Preferences& operator=(const Preferences&) = delete; std::vector<VideoCodec> video_codecs{VideoCodec::kVp8, VideoCodec::kH264}; |