gdi32: "StretchDIBits" with value of zero for "xSrc" and "ySrc"

Juan Lang juan.lang at gmail.com
Mon Sep 22 19:27:20 CDT 2008


Hi Mathias,

+                 * mkosch (2008/09/22)
Please don't put such comments in source files, the source files
aren't a changelog.

+    hProcessHeap = GetProcessHeap();
+    assert(hProcessHeap != NULL);
This assert is pointless, GetProcessHeap cannot reasonably fail.  And
more generally..

+    assert(hDC != NULL);
dont' use assert() in the tests, especially for conditions such as
this which have nothing to do with the function you're testing.  These
will only fail in out-of-memory type situations, and many other things
will fail before your particular test.  So either assume that such
basic functions will succeed, or use ok to check them if there's some
reasonable probability they may fail, or use a combination of skip and
return if one fails.  Just please don't use so many asserts in the
tests.

+    // Initializing random number generator:
In the first place, such a comment is unnecessary, is it's quite clear
what the following line does.  In the second place, C++-style comments
are not allowed in Wine source.
--Juan



More information about the wine-devel mailing list