[Webkit-unassigned] [Bug 157249] Deduplicated initializer lists of BitmapImage constructors.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 4 09:46:04 PDT 2016


--- Comment #8 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to comment #4)
> I've got rid of branch in constructor by using template +
> std::true_type/false_type. Now it should compile to the same code as before,
> though I understand that it's inelegant.

Inelegant indeed... I think we are being too clever here. std::true_type and std::false_type are obtuse and still violate the spirit of the rule against using boolean parameters. I'm also skeptical that there will actually be any significant performance benefit to using templates instead. (Remember that increased code size is likely to hurt performance.) I think this code would be better with boolean parameters, and best with an simple two-value enum class.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160504/d7f96de4/attachment.html>

More information about the webkit-unassigned mailing list