<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Deduplicated initializer lists of BitmapImage constructors."
href="https://bugs.webkit.org/show_bug.cgi?id=157249#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Deduplicated initializer lists of BitmapImage constructors."
href="https://bugs.webkit.org/show_bug.cgi?id=157249">bug 157249</a>
from <span class="vcard"><a class="email" href="mailto:mcatanzaro@igalia.com" title="Michael Catanzaro <mcatanzaro@igalia.com>"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=157249#c4">comment #4</a>)
<span class="quote">> 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.</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>