Skip to content

Commit 40bfcdd

Browse files
committed
df coords are signed
1 parent de2cd37 commit 40bfcdd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

commonTypes.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,15 @@ struct Crd3D {
9090
}
9191
};
9292

93+
namespace
94+
{
95+
using coord_t = decltype(df::coord::x);
96+
}
97+
9398
struct OptCrd3D : public std::optional<Crd3D>
9499
{
95100
operator df::coord() const {
96-
return has_value() ? df::coord{ uint16_t(value().x), uint16_t(value().y), uint16_t(value().z) } : df::coord{};
101+
return has_value() ? df::coord{ coord_t(value().x), coord_t(value().y), coord_t(value().z) } : df::coord{};
97102
}
98103
OptCrd3D() {};
99104
OptCrd3D(const df::coord& c) {

0 commit comments

Comments
 (0)