On 11/8/2012 12:31, Alistair Leslie-Hughes wrote:
Hi,
Thanks Piotr for your help.

Changelog:
      scrrun: Implement IDictionary get_HashVal
+static LONG create_hash_val_float(float fval)
+{
+    TRACE("val = %f\n", fval);
+
+    if(isinf(fval))
+        return 0;
+
+    return (*((DWORD*)&fval)) % 1201;
+}
Emm, do you just mean (DWORD)fval here? If you always hash it as DWORD why not use DWORD argument? And isinf() will stay for float types in your switch(...).


-    FIXME("(%p)->(%p %p)\n", This, Key, HashVal);
+    TRACE("(%p)->(%s %s)\n", This, debugstr_variant(Key), 
debugstr_variant(HashVal));
Tracing HashVal is not useful this way.
+        case VT_R8:
+            V_I4(HashVal) = create_hash_val_float(V_R8(Key));
+            break;
+        case VT_I4:
+            V_I4(HashVal) = create_hash_val_float(V_I4(Key));
+            break;
That's confusing, I mean the way you treat integer type here.


Reply via email to