mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
* perf: avoid double-calls to GetView() There are a lot of places where we call the virtual method GetView() twice in succession: the first to check if the view exists, and the second to use. This PR holds the view in a temp variable instead, e.g.: if (auto* view = foo->GetView()) view->DoSomething(); Co-authored-by: Charles Kerr <charles@charleskerr.com> * perf: avoid discarded GetView() call Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>