From: Craig Topper Date: Mon, 30 Nov 2015 03:11:10 +0000 (+0000) Subject: Use std::begin() and std::end() instead of doing the same manually. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e943be2fc89f8c1f4189442fa33ed3c7ea91021;p=clang Use std::begin() and std::end() instead of doing the same manually. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254281 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/VirtualFileSystem.cpp b/lib/Basic/VirtualFileSystem.cpp index 8acf0a997d..501a5ddb84 100644 --- a/lib/Basic/VirtualFileSystem.cpp +++ b/lib/Basic/VirtualFileSystem.cpp @@ -962,8 +962,7 @@ class RedirectingFileSystemParser { KeyStatusPair("use-external-name", false), }; - DenseMap Keys( - &Fields[0], Fields + sizeof(Fields)/sizeof(Fields[0])); + DenseMap Keys(std::begin(Fields), std::end(Fields)); bool HasContents = false; // external or otherwise std::vector> EntryArrayContents; @@ -1121,8 +1120,7 @@ public: KeyStatusPair("roots", true), }; - DenseMap Keys( - &Fields[0], Fields + sizeof(Fields)/sizeof(Fields[0])); + DenseMap Keys(std::begin(Fields), std::end(Fields)); // Parse configuration and 'roots' for (yaml::MappingNode::iterator I = Top->begin(), E = Top->end(); I != E;