clang-tidy: Fix unnecessary copy of for loop variables in ANGLE
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2019 21:47:51 +0000 (21:47 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Jan 2019 21:47:51 +0000 (21:47 +0000)
commitc45f28dce06b9d8c09c2d5ee13854aa5c53018f6
tree8136f5d05ea666f26019453404ff08a65455b6c6
parent86e5bf4654e66548199f40a4470fa1d15db7f8e5
clang-tidy: Fix unnecessary copy of for loop variables in ANGLE
<https://webkit.org/b/193443>

Reviewed by Alex Christensen.

Fix unwanted copying of loop variables by making them const
references.

* src/compiler/preprocessor/MacroExpander.cpp:
(pp::MacroExpander::ScopedMacroReenabler::~ScopedMacroReenabler):
- Prevents copy and reference churn of std::shared_ptr<Macro>
  objects.
* src/compiler/translator/Compiler.cpp:
(sh::TCompiler::useAllMembersInUnusedStandardAndSharedBlocks):
- Prevents copy of sh::InterfaceBlock structs.
(sh::TCompiler::initializeOutputVariables):
- Prevents copy of sh::Varying structs.
* src/libANGLE/Program.cpp:
(gl::(anonymous namespace)::IncludeSameArrayElement):
- Prevents copy of std::string objects.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/src/compiler/preprocessor/MacroExpander.cpp
Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp
Source/ThirdParty/ANGLE/src/libANGLE/Program.cpp