On Tue, 2015-04-07, Juha Nieminen wrote:
> Ian Collins <
ian-...@hotmail.com> wrote:
>> for( auto longLine : logLines )
>> {
>> for( auto threadId : threadIds )
>> {
>> // stuff
>> }
>> }
>
> Wouldn't it be better to use "auto&" (or "const auto&" if you don't need
> to modify the elements)? Else you'll be getting copies of the elements
> (which might be expensive).
I was going to complain about that, but he was only emulating what was
already there. Perhaps "// stuff" needs to mutate longLine or threadId?
Although it seems very unlikely.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/
snipabacken.se> O o .