Loops remove postfix increment

This commit is contained in:
Maksim Kita 2021-12-20 13:32:13 +03:00
parent 4a67b59cd6
commit 7785eac384
15 changed files with 16 additions and 16 deletions

View File

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

View File

@ -58,7 +58,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const int resolution = col_hindex->getUInt(row); const int resolution = col_hindex->getUInt(row);
if (resolution > MAX_H3_RES) if (resolution > MAX_H3_RES)

View File

@ -63,7 +63,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 resolution = col_hindex->getUInt(row); const UInt64 resolution = col_hindex->getUInt(row);
if (resolution > MAX_H3_RES) if (resolution > MAX_H3_RES)

View File

@ -55,7 +55,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 hindex = col_hindex->getUInt(row); const UInt64 hindex = col_hindex->getUInt(row);

View File

@ -64,7 +64,7 @@ public:
auto current_offset = 0; auto current_offset = 0;
std::vector<int> faces; std::vector<int> faces;
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
int max_faces = maxFaceCount(data[row]); int max_faces = maxFaceCount(data[row]);

View File

@ -55,7 +55,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 hindex = col_hindex->getUInt(row); const UInt64 hindex = col_hindex->getUInt(row);

View File

@ -58,7 +58,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 resolution = col_hindex->getUInt(row); const UInt64 resolution = col_hindex->getUInt(row);
if (resolution > MAX_H3_RES) if (resolution > MAX_H3_RES)

View File

@ -63,7 +63,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 hindex_origin = col_hindex_origin->getUInt(row); const UInt64 hindex_origin = col_hindex_origin->getUInt(row);
const UInt64 hindex_dest = col_hindex_dest->getUInt(row); const UInt64 hindex_dest = col_hindex_dest->getUInt(row);

View File

@ -56,7 +56,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0 ; row < input_rows_count ; row++) for (size_t row = 0 ; row < input_rows_count ; ++row)
{ {
UInt8 res = isPentagon(data[row]); UInt8 res = isPentagon(data[row]);
dst_data[row] = res; dst_data[row] = res;

View File

@ -56,7 +56,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0 ; row < input_rows_count ; row++) for (size_t row = 0 ; row < input_rows_count ; ++row)
{ {
UInt8 res = isResClassIII(data[row]); UInt8 res = isResClassIII(data[row]);
dst_data[row] = res; dst_data[row] = res;

View File

@ -55,7 +55,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 hindex = col_hindex->getUInt(row); const UInt64 hindex = col_hindex->getUInt(row);

View File

@ -76,7 +76,7 @@ public:
std::vector<H3Index> hindex_vec; std::vector<H3Index> hindex_vec;
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 parent_hindex = col_hindex->getUInt(row); const UInt64 parent_hindex = col_hindex->getUInt(row);
const UInt8 child_resolution = col_resolution->getUInt(row); const UInt8 child_resolution = col_resolution->getUInt(row);

View File

@ -66,7 +66,7 @@ public:
auto & dst_data = dst->getData(); auto & dst_data = dst->getData();
dst_data.resize(input_rows_count); dst_data.resize(input_rows_count);
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const UInt64 hindex = col_hindex->getUInt(row); const UInt64 hindex = col_hindex->getUInt(row);
const UInt8 resolution = col_resolution->getUInt(row); const UInt8 resolution = col_resolution->getUInt(row);

View File

@ -73,7 +73,7 @@ public:
std::vector<H3Index> hindex_vec; std::vector<H3Index> hindex_vec;
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
const H3Index origin_hindex = col_hindex->getUInt(row); const H3Index origin_hindex = col_hindex->getUInt(row);
const int k = col_k->getInt(row); const int k = col_k->getInt(row);

View File

@ -310,7 +310,7 @@ public:
FunctionLike func_like; FunctionLike func_like;
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
size_t element_start_row = row != 0 ? column_array.getOffsets()[row-1] : 0; size_t element_start_row = row != 0 ? column_array.getOffsets()[row-1] : 0;
size_t elem_size = column_array.getOffsets()[row]- element_start_row; size_t elem_size = column_array.getOffsets()[row]- element_start_row;
@ -457,7 +457,7 @@ public:
IColumn::Offset current_offset = 0; IColumn::Offset current_offset = 0;
for (size_t row = 0; row < input_rows_count; row++) for (size_t row = 0; row < input_rows_count; ++row)
{ {
size_t element_start_row = row != 0 ? nested_column.getOffsets()[row-1] : 0; size_t element_start_row = row != 0 ? nested_column.getOffsets()[row-1] : 0;
size_t element_size = nested_column.getOffsets()[row]- element_start_row; size_t element_size = nested_column.getOffsets()[row]- element_start_row;