From 55ebc1f6697261ef6e6e4920a28d41db783dba8c Mon Sep 17 00:00:00 2001 From: Chad Austin Date: Tue, 26 Feb 2013 17:52:47 -0800 Subject: Rework how vectors and maps are bound: add bounds checking and return undefined if out of bounds. --- src/embind/embind.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/embind/embind.js b/src/embind/embind.js index 5a0699ba..38720db3 100755 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -85,11 +85,11 @@ function collectRegisteredBaseClasses(rawType) { var rawBaseTypes = Module.__getBaseClasses(rawType); var baseTypes = []; for (var i = 0; i < rawBaseTypes.size(); i++) { - var baseType = typeRegistry[rawBaseTypes.at(i)]; + var baseType = typeRegistry[rawBaseTypes.get(i)]; if (baseType) { baseTypes.push(baseType); } else { - baseTypes = baseTypes.concat(collectRegisteredBaseClasses(rawBaseTypes.at(i))); + baseTypes = baseTypes.concat(collectRegisteredBaseClasses(rawBaseTypes.get(i))); } } return baseTypes; @@ -618,7 +618,7 @@ RegisteredPointer.prototype.getDynamicDowncastType = function(ptr) { if (type && type !== this.pointeeType.rawType) { var derivation = Module.__getDerivationPath(type, this.pointeeType.rawType); for (var i = 0; i < derivation.size(); i++) { - downcastType = typeRegistry[derivation.at(i)]; + downcastType = typeRegistry[derivation.get(i)]; if (downcastType && (!this.isSmartPointer || downcastType.smartPointerType)) { break; } -- cgit v1.2.3-70-g09d2