Mark some constructors as noexcept.
This commit is contained in:
parent
6238f0fc89
commit
712197ad6d
@ -30,7 +30,7 @@ class HttpFile {
|
||||
HttpFile(const HttpFile &) = delete;
|
||||
HttpFile &operator=(const HttpFile &) = delete;
|
||||
|
||||
HttpFile(HttpFile &&other)
|
||||
HttpFile(HttpFile &&other) noexcept
|
||||
: field_name(std::move(other.field_name))
|
||||
, name(std::move(other.name))
|
||||
, content_type(std::move(other.content_type))
|
||||
|
@ -223,7 +223,7 @@ class JsonScope {
|
||||
CHECK(is_active());
|
||||
}
|
||||
JsonScope(const JsonScope &other) = delete;
|
||||
JsonScope(JsonScope &&other) : sb_(other.sb_), jb_(other.jb_), save_scope_(other.save_scope_) {
|
||||
JsonScope(JsonScope &&other) noexcept : sb_(other.sb_), jb_(other.jb_), save_scope_(other.save_scope_) {
|
||||
other.jb_ = nullptr;
|
||||
}
|
||||
JsonScope &operator=(const JsonScope &) = delete;
|
||||
|
@ -50,7 +50,7 @@ PerfWarningTimer::PerfWarningTimer(string name, double max_duration)
|
||||
: name_(std::move(name)), start_at_(Time::now()), max_duration_(max_duration) {
|
||||
}
|
||||
|
||||
PerfWarningTimer::PerfWarningTimer(PerfWarningTimer &&other)
|
||||
PerfWarningTimer::PerfWarningTimer(PerfWarningTimer &&other) noexcept
|
||||
: name_(std::move(other.name_)), start_at_(other.start_at_), max_duration_(other.max_duration_) {
|
||||
other.start_at_ = 0;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class PerfWarningTimer {
|
||||
explicit PerfWarningTimer(string name, double max_duration = 0.1);
|
||||
PerfWarningTimer(const PerfWarningTimer &) = delete;
|
||||
PerfWarningTimer &operator=(const PerfWarningTimer &) = delete;
|
||||
PerfWarningTimer(PerfWarningTimer &&other);
|
||||
PerfWarningTimer(PerfWarningTimer &&other) noexcept;
|
||||
PerfWarningTimer &operator=(PerfWarningTimer &&) = delete;
|
||||
~PerfWarningTimer();
|
||||
void reset();
|
||||
|
@ -24,7 +24,7 @@ class As {
|
||||
As(const As &new_value) = delete;
|
||||
As &operator=(const As &) = delete;
|
||||
As(As &&) = default;
|
||||
As &operator=(As &&new_value) && {
|
||||
As &operator=(As &&new_value) &&noexcept {
|
||||
std::memcpy(ptr_, new_value.ptr_, sizeof(T));
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user