Skip to content

Commit

Permalink
fileprep: Remove unused scale parameter in determineScale (#187)
Browse files Browse the repository at this point in the history
This fixes the following error:
```
error: unused parameter 'scale' [-Werror,-Wunused-parameter]
    351 |     auto calcScale = [](double scale, double low, double
    high)
```
  • Loading branch information
ptitjano authored Feb 13, 2025
1 parent 04d7f10 commit c16839f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions prep/FilePrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void FilePrep::determineScale(const std::vector<FileInfo>& infos)
if (m_b.xform.scale.x != 0.0 && m_b.xform.scale.y != 0.0 && m_b.xform.scale.z != 0.0)
return;

auto calcScale = [](double scale, double low, double high)
auto calcScale = [](double low, double high)
{
// 2 billion is a little less than the int limit. We center the data around 0 with the
// offset, so we're applying the scale to half the range of the data.
Expand All @@ -359,9 +359,9 @@ void FilePrep::determineScale(const std::vector<FileInfo>& infos)
return std::pow(10, (std::max)(power, -4.0));
};

m_b.xform.scale.x = calcScale(m_b.xform.scale.x, m_trueBounds.minx, m_trueBounds.maxx);
m_b.xform.scale.y = calcScale(m_b.xform.scale.y, m_trueBounds.miny, m_trueBounds.maxy);
m_b.xform.scale.z = calcScale(m_b.xform.scale.z, m_trueBounds.minz, m_trueBounds.maxz);
m_b.xform.scale.x = calcScale(m_trueBounds.minx, m_trueBounds.maxx);
m_b.xform.scale.y = calcScale(m_trueBounds.miny, m_trueBounds.maxy);
m_b.xform.scale.z = calcScale(m_trueBounds.minz, m_trueBounds.maxz);
}

void FilePrep::determineSrs(const std::vector<FileInfo>& infos)
Expand Down

0 comments on commit c16839f

Please sign in to comment.