Merge pull request #32960 from bharatnc/ncb/fixes

simplify looping in S2 functions
This commit is contained in:
alexey-milovidov 2021-12-20 08:35:40 +03:00 committed by GitHub
commit 4a67b59cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 10 deletions

View File

@ -73,7 +73,7 @@ public:
auto & dst_data = dst->getData();
dst_data.resize(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const Float64 lon = col_lon->getFloat64(row);
const Float64 lat = col_lat->getFloat64(row);

View File

@ -91,7 +91,7 @@ public:
auto & dst_data = dst->getData();
dst_data.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row=0 ; row < input_rows_count; ++row)
{
const auto center = S2CellId(col_center->getUInt(row));
const Float64 degrees = col_degrees->getFloat64(row);

View File

@ -95,7 +95,7 @@ public:
auto & vec_res_radius = col_res_radius->getData();
vec_res_radius.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const UInt64 first_center = col_center1->getUInt(row);
const Float64 first_radius = col_radius1->getFloat64(row);

View File

@ -72,7 +72,7 @@ public:
auto & dst_data = dst->getData();
dst_data.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const UInt64 id_first = col_id_first->getInt(row);
const UInt64 id_second = col_id_second->getInt(row);

View File

@ -72,7 +72,7 @@ public:
dst_offsets.resize(input_rows_count);
size_t current_offset = 0;
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const UInt64 id = col_id->getUInt(row);

View File

@ -77,7 +77,7 @@ public:
auto & vec_res_second = col_res_second->getData();
vec_res_second.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const auto lo = S2CellId(col_lo->getUInt(row));
const auto hi = S2CellId(col_hi->getUInt(row));

View File

@ -70,7 +70,7 @@ public:
auto & dst_data = dst->getData();
dst_data.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const auto lo = S2CellId(col_lo->getUInt(row));
const auto hi = S2CellId(col_hi->getUInt(row));

View File

@ -81,7 +81,7 @@ public:
auto & vec_res_second = col_res_second->getData();
vec_res_second.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const auto lo1 = S2CellId(col_lo1->getUInt(row));
const auto hi1 = S2CellId(col_hi1->getUInt(row));

View File

@ -79,7 +79,7 @@ public:
auto & vec_res_second = col_res_second->getData();
vec_res_second.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const auto lo1 = S2CellId(col_lo1->getUInt(row));
const auto hi1 = S2CellId(col_hi1->getUInt(row));

View File

@ -78,7 +78,7 @@ public:
auto & latitude = col_latitude->getData();
latitude.reserve(input_rows_count);
for (const auto row : collections::range(0, input_rows_count))
for (size_t row = 0; row < input_rows_count; ++row)
{
const auto id = S2CellId(col_id->getUInt(row));