<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 7, 2009, at 11:35 AM, Misha Brukman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">2009/7/7 Chris Lattner <span dir="ltr"><<a href="mailto:sabre@nondot.org">sabre@nondot.org</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> -    Data.push_back((W >> 0) & 255);<br> -    Data.push_back((W >> 8) & 255);<br> +    Data.push_back((uint8_t)(W >> 0));<br> +    Data.push_back((uint8_t)(W >> 8));</blockquote><div><br></div><div>These are all C-style casts, rather than C++-style casts, e.g. static_cast<uint8_t>(value) .</div><div>Is there a preference for C-style casts in LLVM?  I thought we were trying to stick with C++ here.</div></div></blockquote><br></div><div>We don't use one consistently over the other.  I don't think there is a clear win to using c++ style casts here, in the sense that they don't add any value. OTOH, for const_cast, I think that using the c++ style cast makes the intention more clear.</div><div><br></div><div>-Chris</div><br></body></html>