Skip to content

Commit

Permalink
Fix -Weffc++ warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Feb 20, 2024
1 parent a3e5715 commit 26fb427
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/grids.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class GTXVerticalShiftGrid : public VerticalShiftGrid {
PJ_CONTEXT *m_ctx;
std::unique_ptr<File> m_fp;
std::unique_ptr<FloatLineCache> m_cache;
mutable std::vector<float> m_buffer;
mutable std::vector<float> m_buffer{};

GTXVerticalShiftGrid(const GTXVerticalShiftGrid &) = delete;
GTXVerticalShiftGrid &operator=(const GTXVerticalShiftGrid &) = delete;
Expand Down Expand Up @@ -2046,7 +2046,7 @@ bool CTable2Grid::valueAt(int x, int y, bool compensateNTConvention,

class NTv2GridSet : public HorizontalShiftGridSet {
std::unique_ptr<File> m_fp;
std::unique_ptr<FloatLineCache> m_cache;
std::unique_ptr<FloatLineCache> m_cache{};

NTv2GridSet(const NTv2GridSet &) = delete;
NTv2GridSet &operator=(const NTv2GridSet &) = delete;
Expand Down Expand Up @@ -2077,7 +2077,7 @@ class NTv2Grid : public HorizontalShiftGrid {
uint32_t m_gridIdx;
unsigned long long m_offset;
bool m_mustSwap;
mutable std::vector<float> m_buffer;
mutable std::vector<float> m_buffer{};

NTv2Grid(const NTv2Grid &) = delete;
NTv2Grid &operator=(const NTv2Grid &) = delete;
Expand Down Expand Up @@ -2892,6 +2892,10 @@ class GTiffGenericGrid final : public GenericShiftGrid {
}

bool hasChanged() const override { return m_grid->hasChanged(); }

private:
GTiffGenericGrid(const GTiffGenericGrid &) = delete;
GTiffGenericGrid &operator=(const GTiffGenericGrid &) = delete;
};

// ---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/transformations/gridshift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct GridInfo {
int idxSampleZ = -1;
bool eastingNorthingOffset = false;
bool bilinearInterpolation = true;
std::vector<float> shifts;
std::vector<float> shifts{};
bool swapXYInRes = false;
std::vector<int> idxSampleXYZ{-1, -1, -1};
IXY lastIdxXY = IXY{-1, -1};
Expand Down

0 comments on commit 26fb427

Please sign in to comment.