diff --git a/include/ircd/js/trap.h b/include/ircd/js/trap.h index 4cffb8f38..ffaa3da48 100644 --- a/include/ircd/js/trap.h +++ b/include/ircd/js/trap.h @@ -33,7 +33,7 @@ class trap JSPropertySpec ps[2]; JSFunctionSpec fs[2]; std::unique_ptr _class; - std::map children; + std::map children; // Override these to define JS objects in C virtual value on_call(object::handle, value::handle, const args &); @@ -74,8 +74,8 @@ class trap auto &jsclass() const { return *_class; } // Get child by name (NOT PATH) - const trap &child(const string &name) const; - trap &child(const string &name); + const trap &child(const std::string &name) const; + trap &child(const std::string &name); // Path is absolute to root static trap &find(const string::handle &path); diff --git a/ircd/js.cc b/ircd/js.cc index 457f5943c..f2cda1058 100644 --- a/ircd/js.cc +++ b/ircd/js.cc @@ -641,7 +641,7 @@ ircd::js::trap::find(const string::handle &path) } ircd::js::trap & -ircd::js::trap::child(const string &name) +ircd::js::trap::child(const std::string &name) try { if(name.empty()) @@ -655,7 +655,7 @@ catch(const std::out_of_range &e) } const ircd::js::trap & -ircd::js::trap::child(const string &name) +ircd::js::trap::child(const std::string &name) const try {