FreeBSD Bugzilla – Attachment 170521 Details for
Bug 209675
graphics/inkscape: Fix build with libc++ 3.8.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix type for abs() calls in graphics/inkscape
graphics__inkscape-fix-abs-1.diff (text/plain), 4.25 KB, created by
Dimitry Andric
on 2016-05-20 22:22:34 UTC
(
hide
)
Description:
Fix type for abs() calls in graphics/inkscape
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2016-05-20 22:22:34 UTC
Size:
4.25 KB
patch
obsolete
>Index: graphics/inkscape/files/patch-src_libavoid_connector.cpp >=================================================================== >--- graphics/inkscape/files/patch-src_libavoid_connector.cpp (nonexistent) >+++ graphics/inkscape/files/patch-src_libavoid_connector.cpp (working copy) >@@ -0,0 +1,11 @@ >+--- src/libavoid/connector.cpp.orig 2014-11-30 18:45:32 UTC >++++ src/libavoid/connector.cpp >+@@ -885,7 +885,7 @@ bool ConnRef::generatePath(void) >+ { >+ // Check for consecutive points on opposite >+ // corners of two touching shapes. >+- COLA_ASSERT(abs(i->pathNext->id.objID - i->id.objID) != 2); >++ COLA_ASSERT(abs((int)(i->pathNext->id.objID - i->id.objID)) != 2); >+ } >+ } >+ } > >Property changes on: graphics/inkscape/files/patch-src_libavoid_connector.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp >=================================================================== >--- graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp (nonexistent) >+++ graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp (working copy) >@@ -0,0 +1,33 @@ >+--- src/ui/tools/flood-tool.cpp.orig 2014-11-30 18:45:32 UTC >++++ src/ui/tools/flood-tool.cpp >+@@ -252,13 +252,13 @@ static bool compare_pixels(guint32 check >+ >+ switch (method) { >+ case FLOOD_CHANNELS_ALPHA: >+- return abs(static_cast<int>(ac) - ao) <= threshold; >++ return abs(static_cast<int>(ac) - static_cast<int>(ao)) <= threshold; >+ case FLOOD_CHANNELS_R: >+- return abs(static_cast<int>(ac ? unpremul_alpha(rc, ac) : 0) - (ao ? unpremul_alpha(ro, ao) : 0)) <= threshold; >++ return abs(static_cast<int>(ac ? unpremul_alpha(rc, ac) : 0) - static_cast<int>(ao ? unpremul_alpha(ro, ao) : 0)) <= threshold; >+ case FLOOD_CHANNELS_G: >+- return abs(static_cast<int>(ac ? unpremul_alpha(gc, ac) : 0) - (ao ? unpremul_alpha(go, ao) : 0)) <= threshold; >++ return abs(static_cast<int>(ac ? unpremul_alpha(gc, ac) : 0) - static_cast<int>(ao ? unpremul_alpha(go, ao) : 0)) <= threshold; >+ case FLOOD_CHANNELS_B: >+- return abs(static_cast<int>(ac ? unpremul_alpha(bc, ac) : 0) - (ao ? unpremul_alpha(bo, ao) : 0)) <= threshold; >++ return abs(static_cast<int>(ac ? unpremul_alpha(bc, ac) : 0) - static_cast<int>(ao ? unpremul_alpha(bo, ao) : 0)) <= threshold; >+ case FLOOD_CHANNELS_RGB: >+ guint32 amc, rmc, bmc, gmc; >+ //amc = 255*255 - (255-ac)*(255-ad); amc = (amc + 127) / 255; >+@@ -268,9 +268,9 @@ static bool compare_pixels(guint32 check >+ gmc = (255-ac)*gd + 255*gc; gmc = (gmc + 127) / 255; >+ bmc = (255-ac)*bd + 255*bc; bmc = (bmc + 127) / 255; >+ >+- diff += abs(static_cast<int>(amc ? unpremul_alpha(rmc, amc) : 0) - (amop ? unpremul_alpha(rmop, amop) : 0)); >+- diff += abs(static_cast<int>(amc ? unpremul_alpha(gmc, amc) : 0) - (amop ? unpremul_alpha(gmop, amop) : 0)); >+- diff += abs(static_cast<int>(amc ? unpremul_alpha(bmc, amc) : 0) - (amop ? unpremul_alpha(bmop, amop) : 0)); >++ diff += abs(static_cast<int>(amc ? unpremul_alpha(rmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(rmop, amop) : 0)); >++ diff += abs(static_cast<int>(amc ? unpremul_alpha(gmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(gmop, amop) : 0)); >++ diff += abs(static_cast<int>(amc ? unpremul_alpha(bmc, amc) : 0) - static_cast<int>(amop ? unpremul_alpha(bmop, amop) : 0)); >+ return ((diff / 3) <= ((threshold * 3) / 4)); >+ >+ case FLOOD_CHANNELS_H: > >Property changes on: graphics/inkscape/files/patch-src_ui_tools_flood-tool.cpp >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209675
: 170521