Skip to content

Commit

Permalink
migrate from untagged array-range dynamic ctor (assorted)
Browse files Browse the repository at this point in the history
Reviewed By: Orvid

Differential Revision: D62553013

fbshipit-source-id: 14d9ffcd3527e80ccf16e7ec311bece4334fe174
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Sep 12, 2024
1 parent 1d70597 commit 6d5fcc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hphp/tools/tc-print/tc-print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ dynamic getAnnotation(const Annotations& annotations) {

dynamic getTransRec(const TransRec* tRec,
const PerfEventsMap<TransID>& transPerfEvents) {
auto const guards = dynamic(tRec->guards.begin(), tRec->guards.end());
auto const guards = dynamic::array_range(tRec->guards);

auto const sk = tRec->src;
auto const resumeMode = [&] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ class ConfigPreprocessor::BuiltIns {
static dynamic keysMacro(Context&& ctx) {
const auto& dictionary = ctx.at("dictionary");
checkLogic(dictionary.isObject(), "Keys: dictionary is not object");
return dynamic(dictionary.keys().begin(), dictionary.keys().end());
return dynamic::array_range(dictionary.keys());
}

/**
Expand All @@ -645,7 +645,7 @@ class ConfigPreprocessor::BuiltIns {
static dynamic valuesMacro(Context&& ctx) {
const auto& dictionary = ctx.at("dictionary");
checkLogic(dictionary.isObject(), "Values: dictionary is not object");
return dynamic(dictionary.values().begin(), dictionary.values().end());
return dynamic::array_range(dictionary.values());
}

/**
Expand Down Expand Up @@ -853,7 +853,7 @@ class ConfigPreprocessor::BuiltIns {

std::vector<StringPiece> result;
folly::split(delim, dict, result);
return folly::dynamic(result.begin(), result.end());
return folly::dynamic::array_range(result);
}

/**
Expand Down

0 comments on commit 6d5fcc6

Please sign in to comment.