diff options
author | Ben Firshman <ben@firshman.co.uk> | 2010-06-12 00:49:16 +0100 |
---|---|---|
committer | Ben Firshman <ben@firshman.co.uk> | 2010-06-12 00:49:16 +0100 |
commit | deca9c132e89b00b886a1fa211aedc823a1730bd (patch) | |
tree | 53a45aa35adf2b151cb1cafe6cccab72e8e3cbab | |
parent | bb142e20bfb510572846d84e0aec0b8bf4b1edb3 (diff) | |
download | jsnes-deca9c132e89b00b886a1fa211aedc823a1730bd.zip jsnes-deca9c132e89b00b886a1fa211aedc823a1730bd.tar.gz jsnes-deca9c132e89b00b886a1fa211aedc823a1730bd.tar.bz2 |
Removed unnecessary inheritance util
-rw-r--r-- | js.2/utils.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/js.2/utils.js b/js.2/utils.js index 5a438d9..6eacce3 100644 --- a/js.2/utils.js +++ b/js.2/utils.js @@ -4,17 +4,5 @@ JSNES.Utils = { for (var i=0; i<length; ++i) { dest[destPos+i] = src[srcPos+i]; } - }, - - // http://www.sitepoint.com/blogs/2006/01/17/javascript-inheritance/ - copyPrototype: function(descendant, parent) { - var sConstructor = parent.toString(); - var aMatch = sConstructor.match( /\s*function (.*)\(/ ); - if ( aMatch != null ) { descendant.prototype[aMatch[1]] = parent; } - for (var m in parent.prototype) { - if (typeof descendant.prototype[m] == 'undefined') { - descendant.prototype[m] = parent.prototype[m]; - } - } } } |