Removing the use of auto in the devtoolset patch

This commit is contained in:
Dave Johansen 2015-01-02 12:21:09 -07:00
parent 4c38795a19
commit 70d0626d0a

View file

@ -9,10 +9,10 @@
+ if (const char *software_collections = getenv("X_SCLS")) { + if (const char *software_collections = getenv("X_SCLS")) {
+ SmallVector<StringRef, 4> Scls; + SmallVector<StringRef, 4> Scls;
+ StringRef(software_collections).split(Scls, StringRef(" "), -1, false); + StringRef(software_collections).split(Scls, StringRef(" "), -1, false);
+ for (const auto &Scl : Scls) { + for (SmallVector<StringRef, 4>::const_iterator SclsIter = Scls.begin(); SclsIter != Scls.end(); ++SclsIter) {
+ if (!Scl.startswith(StringRef("devtoolset-"))) + if (!SclsIter->startswith(StringRef("devtoolset-")))
+ continue; + continue;
+ const std::string SclPath = std::string("/opt/rh/") + Scl.str() + std::string("/root/usr"); + const std::string SclPath = std::string("/opt/rh/") + SclsIter->str() + std::string("/root/usr");
+ Prefixes.push_back(SclPath); + Prefixes.push_back(SclPath);
+ } + }
+ } + }