0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-01 08:18:20 +02:00

ircd::js: Use std::string for trap mapping.

This commit is contained in:
Jason Volk 2016-11-07 16:30:28 -08:00
parent a3c06466fb
commit ae4057b1d5
2 changed files with 5 additions and 5 deletions

View file

@ -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);

View file

@ -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
{