@@ -147,22 +147,19 @@ IncludeModernizePPCallbacks::IncludeModernizePPCallbacks(
147147 {" string.h" , " cstring" }, {" time.h" , " ctime" },
148148 {" wchar.h" , " cwchar" }, {" wctype.h" , " cwctype" },
149149 };
150- for (const auto &KeyValue : CXX98Headers)
151- CStyledHeaderToCxx.insert (KeyValue);
150+ CStyledHeaderToCxx.insert (std::begin (CXX98Headers), std::end (CXX98Headers));
152151
153152 static constexpr std::pair<StringRef, StringRef> CXX11Headers[] = {
154153 {" fenv.h" , " cfenv" }, {" stdint.h" , " cstdint" },
155154 {" inttypes.h" , " cinttypes" }, {" tgmath.h" , " ctgmath" },
156155 {" uchar.h" , " cuchar" },
157156 };
158157 if (LangOpts.CPlusPlus11 )
159- for (const auto &KeyValue : CXX11Headers)
160- CStyledHeaderToCxx.insert (KeyValue);
158+ CStyledHeaderToCxx.insert (std::begin (CXX11Headers), std::end (CXX11Headers));
161159
162160 static constexpr StringRef HeadersToDelete[] = {" stdalign.h" , " stdbool.h" ,
163161 " iso646.h" };
164- for (const auto &Key : HeadersToDelete)
165- DeleteHeaders.insert (Key);
162+ DeleteHeaders.insert_range (HeadersToDelete);
166163}
167164
168165void IncludeModernizePPCallbacks::InclusionDirective (
0 commit comments