Browse files

Cleaned up some code

  • Loading branch information...
1 parent 886b864 commit 2715b992c8e81107f2f19a155c593f4d222b4b76 Tobias Schneider committed Jun 19, 2010
Showing with 5 additions and 6 deletions.
  1. +5 −5 src/renderer/svg.js
  2. +0 −1 src/stream.js
View
10 src/renderer/svg.js
@@ -716,20 +716,20 @@
}
}
- function objectId(object){
+ function objectId(obj){
var memo = objectId._memo || (objectId._memo = {}),
nextId = (objectId._nextId || (objectId._nextId = 1)),
- key = object2key(object),
+ key = object2key(obj),
@exaos
exaos added a line comment Aug 25, 2010

Yes. "object" is reserved for special purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
origId = memo[key];
if(!origId){ memo[key] = nextId; }
return origId || objectId._nextId++;
}
- function object2key(object){
+ function object2key(obj){
var a = 1,
b = 0;
- for(var prop in object){
- var val = object[prop];
+ for(var prop in obj){
+ var val = obj[prop];
if("object" == typeof val){ a += object2key(val); }
else{
var buff = '' + val;
View
1 src/stream.js
@@ -383,7 +383,6 @@
var distTable = buildHuffTable(litLengths.splice(numLitLengths, numDistLengths)),
litTable = buildHuffTable(litLengths);
}
- console.log(distTable, litTable);
do{
var sym = decodeSymbol(t, litTable);
if(sym < 256){ buff.push(raw ? sym : fromCharCode(sym)); }

0 comments on commit 2715b99

Please sign in to comment.