Skip to content

Commit b4a4fe4

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
fbcode//hphp/compiler:compiler
Reviewed By: gcramer23 Differential Revision: D72448757 fbshipit-source-id: 850dbe1a5db5db5dc92ef973292f1c5932ec5bd3
1 parent 5fdb4b7 commit b4a4fe4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

hphp/compiler/compiler-systemlib.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ int prepareOptions(CompilerOptions &po, int argc, char **argv) {
124124
std::cout << desc << "\n";
125125
return 1;
126126
}
127-
if (vm.count("version")) {
127+
if (vm.contains("version")) {
128128
std::cout << "HipHop Repo Compiler";
129129
std::cout << " " << HHVM_VERSION;
130130
std::cout << " (" << (debug ? "dbg" : "rel") << ")\n";
@@ -230,7 +230,7 @@ bool process(CompilerOptions &po) {
230230

231231
for (auto extension : ExtensionRegistry::getExtensions()) {
232232
for (auto file : extension->hackFiles()) {
233-
if (!files.count(file)) {
233+
if (!files.contains(file)) {
234234
Logger::Error(
235235
"Error while compiling stdlib: %s not found in input files - did you add an extension without any hack files? If so, override hackFiles to return an empty vector.", file.c_str());
236236
}

hphp/compiler/compiler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ int prepareOptions(CompilerOptions &po, int argc, char **argv) {
603603
std::cout << desc << "\n";
604604
return 1;
605605
}
606-
if (vm.count("version")) {
606+
if (vm.contains("version")) {
607607
std::cout << "HipHop Repo Compiler";
608608
std::cout << " " << HHVM_VERSION;
609609
std::cout << " (" << (debug ? "dbg" : "rel") << ")\n";
@@ -612,12 +612,12 @@ int prepareOptions(CompilerOptions &po, int argc, char **argv) {
612612
return 1;
613613
}
614614

615-
if (vm.count("compiler-id")) {
615+
if (vm.contains("compiler-id")) {
616616
std::cout << compilerId() << "\n";
617617
return 1;
618618
}
619619

620-
if (vm.count("repo-schema")) {
620+
if (vm.contains("repo-schema")) {
621621
std::cout << repoSchemaId() << "\n";
622622
return 1;
623623
}

hphp/compiler/package.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ coro::Task<void> Package::parseGroup(
864864
auto const workItems = paths.size();
865865
for (size_t i = 0; i < workItems; i++) {
866866
auto const& fileName = metas[i].m_filename;
867-
if (!m_extraStaticFiles.count(fileName)) {
867+
if (!m_extraStaticFiles.contains(fileName)) {
868868
m_discoveredStaticFiles.emplace(
869869
fileName,
870870
Option::CachePHPFile ? paths[i] : ""
@@ -1000,7 +1000,7 @@ void Package::resolveOnDemand(OndemandInfo& out,
10001000
auto const& onPath = [&] (const std::string& rpath,
10011001
const StringData* sym) {
10021002
if (rpath.empty()) return;
1003-
if (Option::PackageExcludeFiles.count(rpath) > 0 ||
1003+
if (Option::PackageExcludeFiles.contains(rpath) ||
10041004
Option::IsFileExcluded(rpath, Option::PackageExcludePatterns)) {
10051005
// Found symbol in UnitIndex, but the corresponding file was excluded.
10061006
Logger::FVerbose("excluding ondemand file {}", rpath);
@@ -1757,7 +1757,7 @@ coro::Task<Package::EmitInfo> Package::emitGroup(
17571757
auto const workItems = group.m_files.size();
17581758
for (size_t i = 0; i < workItems; i++) {
17591759
auto const& fileName = group.m_files[i];
1760-
if (!m_extraStaticFiles.count(fileName)) {
1760+
if (!m_extraStaticFiles.contains(fileName)) {
17611761
m_discoveredStaticFiles.emplace(
17621762
fileName,
17631763
Option::CachePHPFile ? createFullPath(fileName, m_root) : ""

0 commit comments

Comments
 (0)