[macports-ports] branch master updated: qt4-mac: Fix pointer comparison with 0.

Mihai Moldovan ionic at macports.org
Sun May 28 15:34:58 UTC 2017


On 05/27/2017 11:08 AM, Ryan Schmidt wrote:
>> diff --git a/aqua/qt4-mac/files/patch-fix_pointer_comparison_to_0.diff b/aqua/qt4-mac/files/patch-fix_pointer_comparison_to_0.diff
>>
>> new file mode 100644
>>
>> index 0000000..4ed86aa
>>
>> --- /dev/null
>>
>> +++ b/aqua/qt4-mac/files/patch-fix_pointer_comparison_to_0.diff
>>
>> @@ -0,0 +1,22 @@
>>
>> +--- src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp.orig
>>
>> ++++ src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp
>>
>> +@@ -74,7 +74,7 @@
>>
>> +     RefPtr<HTMLImageElement> image = adoptRef(new HTMLImageElement(imgTag, document));
>>
>> +     if (optionalWidth)
>>
>> +         image->setWidth(*optionalWidth);
>>
>> +-    if (optionalHeight > 0)
>>
>> ++    if (optionalHeight)
>>
>> +         image->setHeight(*optionalHeight);
>>
>> +     return image.release();
>>
>> + }
> 
> I agree that this change looks equivalent, but:

Strictly speaking, even > 0 is not equivalent to ((optionalHeight) =>
(optionalHeight != 0)) for this signed type.



Mihai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 927 bytes
Desc: OpenPGP digital signature
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170528/fde7c5ce/attachment.sig>


More information about the macports-dev mailing list