aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/GraphBase.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-17 15:04:16 +0800
committercrupest <crupest@outlook.com>2021-03-17 15:04:16 +0800
commitaf2e38b320905bf3b1e5d0969d0811c47289bbfe (patch)
tree18a55d5cf3fc5bea4ab342476dc5a57574808839 /include/cru/platform/GraphBase.hpp
parent7703063a5816b089483e78ccd74bb9902ccfbea8 (diff)
downloadcru-af2e38b320905bf3b1e5d0969d0811c47289bbfe.tar.gz
cru-af2e38b320905bf3b1e5d0969d0811c47289bbfe.tar.bz2
cru-af2e38b320905bf3b1e5d0969d0811c47289bbfe.zip
...
Diffstat (limited to 'include/cru/platform/GraphBase.hpp')
-rw-r--r--include/cru/platform/GraphBase.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cru/platform/GraphBase.hpp b/include/cru/platform/GraphBase.hpp
index 6bf2736f..4d3c8f83 100644
--- a/include/cru/platform/GraphBase.hpp
+++ b/include/cru/platform/GraphBase.hpp
@@ -129,6 +129,11 @@ constexpr Size operator+(const Thickness& thickness, const Size& size) {
return operator+(size, thickness);
}
+constexpr Thickness operator+(const Thickness& left, const Thickness& right) {
+ return {left.left + right.left, left.top + right.top,
+ left.right + right.right, left.bottom + right.bottom};
+}
+
constexpr bool operator==(const Thickness& left, const Thickness& right) {
return left.left == right.left && left.top == right.top &&
left.right == right.right && left.bottom == right.bottom;