Skip to content

Commit

Permalink
Fix for Clang tidy, needed for fbcode include (facebook#44655)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#44655

Required to compile with clang

This is because previously it was comparing size_t with int which is not allowed under compilation with clang

Changelog: [Internal] [Fixed] - Replaced old style for loop with new style to avoid clang errors with size_t to int comparisons

Differential Revision: D57721635

fbshipit-source-id: 2738f7b415d668c37536f7f93b2e0985fa2cc5e6
  • Loading branch information
jmavra authored and kosmydel committed Jun 11, 2024
1 parent 79c3d4e commit fcff739
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ void fromRawValue(
auto length = items.size();
result.clear();
result.reserve(length);
for (size_t i = 0; i < length; i++) {
for (auto& item : items) {
T itemResult;
fromRawValue(context, items.at(i), itemResult);
fromRawValue(context, item, itemResult);
result.push_back(itemResult);
}
return;
Expand All @@ -89,9 +89,9 @@ void fromRawValue(
auto length = items.size();
result.clear();
result.reserve(length);
for (int i = 0; i < length; i++) {
for (auto& item : items) {
T itemResult;
fromRawValue(context, items.at(i), itemResult);
fromRawValue(context, item, itemResult);
result.push_back(itemResult);
}
return;
Expand Down

0 comments on commit fcff739

Please sign in to comment.