mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 08:15:38 +07:00
fix missing noexcepts and remove less operator for image
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user