aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsystem/include/emscripten/bind.h4
-rw-r--r--system/include/emscripten/val.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h
index 652fb1b4..ce9053f2 100755
--- a/system/include/emscripten/bind.h
+++ b/system/include/emscripten/bind.h
@@ -793,11 +793,11 @@ namespace emscripten {
////////////////////////////////////////////////////////////////////////////////
template<typename T>
std::vector<T> vecFromJSArray(val v) {
- auto l = v.get("length").as<unsigned>();
+ auto l = v["length"].as<unsigned>();
std::vector<T> rv;
for(unsigned i = 0; i < l; ++i) {
- rv.push_back(v.get(i).as<T>());
+ rv.push_back(v[i].as<T>());
}
return rv;
diff --git a/system/include/emscripten/val.h b/system/include/emscripten/val.h
index 4903751b..87126d08 100644
--- a/system/include/emscripten/val.h
+++ b/system/include/emscripten/val.h
@@ -105,7 +105,7 @@ namespace emscripten {
}
template<typename T>
- val get(const T& key) const {
+ val operator[](const T& key) const {
return val(internal::_emval_get_property(handle, val(key).handle));
}