Skip to content

Commit

Permalink
these functions can/should be noexcept
Browse files Browse the repository at this point in the history
  • Loading branch information
eteran committed Nov 22, 2019
1 parent ef4aa5c commit b8699cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/State.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class EDB_EXPORT State {
State();
State(const State &other);
State &operator=(const State &rhs);
State(State &&other);
State &operator=(State &&rhs);
State(State &&other) noexcept;
State &operator=(State &&rhs) noexcept;
~State();

public:
Expand Down
4 changes: 2 additions & 2 deletions src/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ State::State(const State &other)
* @brief State::State
* @param other
*/
State::State(State &&other)
State::State(State &&other) noexcept
: impl_(std::move(other.impl_)) {
}

Expand All @@ -65,7 +65,7 @@ void State::swap(State &other) {
* @param rhs
* @return
*/
State &State::operator=(State &&rhs) {
State &State::operator=(State &&rhs) noexcept {
if (this != &rhs) {
impl_ = std::move(rhs.impl_);
}
Expand Down

0 comments on commit b8699cb

Please sign in to comment.