mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd::js: Use std::string for trap mapping.
This commit is contained in:
parent
a3c06466fb
commit
ae4057b1d5
2 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ class trap
|
|||
JSPropertySpec ps[2];
|
||||
JSFunctionSpec fs[2];
|
||||
std::unique_ptr<JSClass> _class;
|
||||
std::map<persist_string, trap *, persist_string::less> children;
|
||||
std::map<std::string, trap *> 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);
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue