diff options
Diffstat (limited to 'src/map/script-call.hpp')
-rw-r--r-- | src/map/script-call.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/script-call.hpp b/src/map/script-call.hpp index da9d03f..89cadb8 100644 --- a/src/map/script-call.hpp +++ b/src/map/script-call.hpp @@ -24,6 +24,8 @@ #include "fwd.hpp" +#include "../compat/borrow.hpp" + #include "../range/fwd.hpp" #include "../generic/fwd.hpp" @@ -38,16 +40,15 @@ enum class ByteCode : uint8_t; // implemented in script-parse.cpp because reasons struct ScriptPointer { - const ScriptBuffer *code; + Option<Borrowed<const ScriptBuffer>> code; size_t pos; ScriptPointer() - : code() + : code(None) , pos() {} - - ScriptPointer(const ScriptBuffer *c, size_t p) - : code(c) + ScriptPointer(Borrowed<const ScriptBuffer> c, size_t p) + : code(Some(c)) , pos(p) {} |