From 7b3382e6e10a34098eb3f3d97473eab47ac3ac94 Mon Sep 17 00:00:00 2001 From: olpc user Date: Fri, 6 Dec 2019 08:25:51 -0800 Subject: some code around a timing concept --- starts/meaning-vm/level-1/baseref.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'starts/meaning-vm/level-1') diff --git a/starts/meaning-vm/level-1/baseref.hpp b/starts/meaning-vm/level-1/baseref.hpp index 63045fa..6215225 100644 --- a/starts/meaning-vm/level-1/baseref.hpp +++ b/starts/meaning-vm/level-1/baseref.hpp @@ -25,9 +25,9 @@ struct baseref : public level0::baseref std::string const & name() const { return getname(self); } operator std::string const &() const { return getname(self); } - operator char const *() const { return getname(self)->data.c_str(); } + explicit operator char const *() const { return getname(self)->data.c_str(); } - ref operator-(ref other) { return hyphenate(self.ptr(), other.ptr()); } + ref operator-(ref other) const { return hyphenate(self, other); } template void vset(ref const & type, T const & v) { self.set(type, level1::alloc(v)); } @@ -35,9 +35,9 @@ struct baseref : public level0::baseref template std::function & fun() { return self.template val>(); } template - void fun(std::function const & f) { val(f); } + void fun(std::function const & f) { self.val(f); } template - void fun(std::function const & f) { val(voidtoret(f)); } + void fun(std::function const & f) { self.val(voidtoret(f)); } template void fget(ref const & type) { return self.template vget>(type); } template -- cgit v1.2.3