<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 25, 2014 at 9:22 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">> - char *Buf = new char[BufSize];<br>
> + std::vector<char> Buffer(BufSize);<br>
> + char *Buf = Buffer.data();<br>
<br>
</div>I'd skip the intermediate variable and just pass "Buffer.data()" in<br>
the two callsites. It avoids an extra layer of indirection a developer<br>
would have to look through while following this code.<br>
<br>
(but opinions may differ here)</blockquote></div><br>Please back this change out.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This is a really significant semantic change: you're forcing the initialization of the entire buffer!</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">You need to get these patches pre-commit reviewed.</div></div>