From 780a0d771edbe21dcfa3405163ffbdf7f7fa4604 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 13 Oct 2014 13:16:34 -0700 Subject: Convert container lookups to use Option> --- src/map/magic-interpreter.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/map/magic-interpreter.hpp') diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp index 7cdf7bf..09642cb 100644 --- a/src/map/magic-interpreter.hpp +++ b/src/map/magic-interpreter.hpp @@ -50,8 +50,14 @@ namespace magic { struct location_t { - map_local *m; + Borrowed m; int x, y; + + // This constructor exists solely to work around the design constraints + // of sexpr::Variant<>. See comments in variant.tcc for future plans. + __attribute__((deprecated)) + location_t() noexcept : m(borrow(undefined_gat)), x(), y() {} + location_t(Borrowed m_, int x_, int y_) : m(m_), x(x_), y(y_) {} }; struct AreaUnion -- cgit v1.2.3-70-g09d2