aboutsummaryrefslogtreecommitdiff
path: root/type_ztf.h
diff options
context:
space:
mode:
Diffstat (limited to 'type_ztf.h')
-rw-r--r--type_ztf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/type_ztf.h b/type_ztf.h
index 42798b2..8ecc9ca 100644
--- a/type_ztf.h
+++ b/type_ztf.h
@@ -38,11 +38,13 @@ struct DeltaLineCol {
};
constexpr DeltaLineCol operator-(const LineCol& lhs, const LineCol& rhs) {
- return DeltaLineCol{lhs.line - rhs.line, lhs.col - rhs.col};
+ return DeltaLineCol{static_cast<dim_t>(lhs.line - rhs.line),
+ static_cast<dim_t>(lhs.col - rhs.col)};
}
constexpr LineCol operator+(const LineCol& lhs, const DeltaLineCol& rhs) {
- return LineCol{lhs.line + rhs.line, lhs.col + rhs.col};
+ return LineCol{static_cast<dim_t>(lhs.line + rhs.line),
+ static_cast<dim_t>(lhs.col + rhs.col)};
}
} // namespace ztf