This commit is contained in:
Federico Cecchetto 2021-07-11 17:17:22 +02:00
parent 063caa51f9
commit 6f53ed5d87

View File

@ -73,6 +73,18 @@ namespace scripting
{ {
return {this->id_, this->get_value_id(key)}; return {this->id_, this->get_value_id(key)};
} }
array_value operator[](const array_key& key) const
{
if (key.is_integer)
{
return {this->id_, this->get_value_id(key.index)};
}
else
{
return {this->id_, this->get_value_id(key.key)};
}
}
private: private:
unsigned int id_; unsigned int id_;
}; };