fix missing noexcepts and remove less operator for image

This commit is contained in:
2018-12-03 16:47:15 +07:00
parent c67848a05a
commit 114b3f8694
2 changed files with 4 additions and 11 deletions

View File

@@ -61,13 +61,13 @@ namespace e2d
image(const image& other);
image& operator=(const image& other);
image(const v2u& size, image_data_format format, buffer&& data);
image(const v2u& size, image_data_format format, buffer&& data) noexcept;
image(const v2u& size, image_data_format format, const buffer& data);
image& assign(image&& other) noexcept;
image& assign(const image& other);
image& assign(const v2u& size, image_data_format format, buffer&& data);
image& assign(const v2u& size, image_data_format format, buffer&& data) noexcept;
image& assign(const v2u& size, image_data_format format, const buffer& data);
void swap(image& other) noexcept;
@@ -89,7 +89,6 @@ namespace e2d
};
void swap(image& l, image& r) noexcept;
bool operator<(const image& l, const image& r) noexcept;
bool operator==(const image& l, const image& r) noexcept;
bool operator!=(const image& l, const image& r) noexcept;
}

View File

@@ -63,7 +63,7 @@ namespace e2d
return assign(other);
}
image::image(const v2u& size, image_data_format format, buffer&& data) {
image::image(const v2u& size, image_data_format format, buffer&& data) noexcept {
assign(size, format, std::move(data));
}
@@ -88,7 +88,7 @@ namespace e2d
return *this;
}
image& image::assign(const v2u& size, image_data_format format, buffer&& data) {
image& image::assign(const v2u& size, image_data_format format, buffer&& data) noexcept {
data_.assign(std::move(data));
size_ = size;
format_ = format;
@@ -196,12 +196,6 @@ namespace e2d
l.swap(r);
}
bool operator<(const image& l, const image& r) noexcept {
return l.format() < r.format()
|| (l.format() == r.format() && l.size() < r.size())
|| (l.format() == r.format() && l.size() == r.size() && l.data() < r.data());
}
bool operator==(const image& l, const image& r) noexcept {
return l.format() == r.format()
&& l.size() == r.size()