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 87158a1 commit 5fd3079
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mcrouter/lib/config/ConfigPreprocessor.cpp
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 5fd3079

Please sign in to comment.