Closed GoogleCodeExporter closed 9 years ago
You should pass CefWindowInfo by reference instead of by value. It's a non-POD
type and the copy action is potentially expensive (string duplication, etc).
Original comment by magreenb...@gmail.com
on 12 Mar 2014 at 3:01
> You should pass CefWindowInfo by reference instead of by value.
I fully understand that, though the main issue here is that I cannot *return* a
CefWindowInfo. For the function parameter case, we already have an almost
universal idiom to pass potentially expensive to copy parameters by const
reference, so I think this is a no-issue. For return values, we also have
return value optimization, though I understand that it'll only work for certain
scenarios.
Still, the issue of not being able to return a CefWindowInfo is quite absurd,
considering the things mentioned above and especially that there is a provided
copy constructor.
I won't insist though, and working it around is very easy.
BTW, in C++11 this won't be an issue at all with move semantics. :-)
Original comment by MarkWynn...@gmail.com
on 14 Mar 2014 at 4:23
Original issue reported on code.google.com by
MarkWynn...@gmail.com
on 24 Feb 2014 at 8:03