Skip to content

Commit 3f11628

Browse files
committed
fixed conflict
2 parents af6ec67 + 6f0c665 commit 3f11628

File tree

1 file changed

+38
-43
lines changed

1 file changed

+38
-43
lines changed

jstorage.js

Lines changed: 38 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -806,46 +806,43 @@
806806
* @return {number} 32-bit positive integer hash
807807
*/
808808

809-
function murmurhash2_32_gc(str, seed) {
810-
var
811-
l = str.length,
812-
h = (seed || 0x9747b28c) ^ l,
813-
i = 0,
814-
k,
815-
a = 0xff,
816-
b = 0xffff,
817-
c = 0x5bd1e995;
818-
819-
while (l >= 4) {
820-
k =
821-
((str.charCodeAt(i) & a)) |
822-
((str.charCodeAt(++i) & a) << 8) |
823-
((str.charCodeAt(++i) & a) << 16) |
824-
((str.charCodeAt(++i) & a) << 24);
825-
826-
k = (((k & b) * c) + ((((k >>> 16) * c) & b) << 16));
827-
k ^= k >>> 24;
828-
k = (((k & b) * c) + ((((k >>> 16) * c) & b) << 16));
829-
830-
h = (((h & b) * c) + ((((h >>> 16) * c) & b) << 16)) ^ k;
831-
832-
l -= 4;
833-
++i;
834-
}
835-
836-
switch (l) {
837-
case 3: h ^= (str.charCodeAt(i + 2) & a) << 16;
838-
case 2: h ^= (str.charCodeAt(i + 1) & a) << 8;
839-
case 1: h ^= (str.charCodeAt(i) & a);
840-
h = (((h & b) * c) + ((((h >>> 16) * c) & b) << 16));
841-
}
842-
843-
h ^= h >>> 13;
844-
h = (((h & b) * c) + ((((h >>> 16) * c) & b) << 16));
845-
h ^= h >>> 15;
846-
847-
return h >>> 0;
848-
}
809+
function murmurhash2_32_gc(str, seed) {
810+
var
811+
l = str.length,
812+
h = seed ^ l,
813+
i = 0,
814+
k;
815+
816+
while (l >= 4) {
817+
k =
818+
((str.charCodeAt(i) & 0xff)) |
819+
((str.charCodeAt(++i) & 0xff) << 8) |
820+
((str.charCodeAt(++i) & 0xff) << 16) |
821+
((str.charCodeAt(++i) & 0xff) << 24);
822+
823+
k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
824+
k ^= k >>> 24;
825+
k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
826+
827+
h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;
828+
829+
l -= 4;
830+
++i;
831+
}
832+
833+
switch (l) {
834+
case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
835+
case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
836+
case 1: h ^= (str.charCodeAt(i) & 0xff);
837+
h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
838+
}
839+
840+
h ^= h >>> 13;
841+
h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
842+
h ^= h >>> 15;
843+
844+
return h >>> 0;
845+
}
849846

850847
////////////////////////// PUBLIC INTERFACE /////////////////////////
851848

@@ -906,9 +903,7 @@
906903
get: function(key, def){
907904
_checkKey(key);
908905
if(key in _storage){
909-
if(_storage[key] && typeof _storage[key] == "object" &&
910-
_storage[key]._is_xml &&
911-
_storage[key]._is_xml){
906+
if(_storage[key] && typeof _storage[key] == "object" && _storage[key]._is_xml) {
912907
return _XMLService.decode(_storage[key].xml);
913908
}else{
914909
return _storage[key];

0 commit comments

Comments
 (0)