Skip to content

Commit 2786ab4

Browse files
committed
Warnings.
1 parent 4b02f43 commit 2786ab4

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

alg/viewshed/viewshed_executor.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ ViewshedExecutor::ViewshedExecutor(GDALRasterBand &srcBand,
147147
const Window &outExtent,
148148
const Window &curExtent, const Options &opts,
149149
Progress &progress, bool emitWarningIfNoData)
150-
: m_pool(4), m_srcBand(srcBand), m_sdBand(sdBand), m_dstBand(dstBand),
151-
m_emitWarningIfNoData(emitWarningIfNoData), oOutExtent(outExtent),
152-
oCurExtent(curExtent), m_nX(nX - oOutExtent.xStart), m_nY(nY),
153-
oOpts(opts), oProgress(progress),
150+
: m_pool(4), m_dummyBand(), m_srcBand(srcBand), m_sdBand(sdBand),
151+
m_dstBand(dstBand), m_emitWarningIfNoData(emitWarningIfNoData),
152+
oOutExtent(outExtent), oCurExtent(curExtent),
153+
m_nX(nX - oOutExtent.xStart), m_nY(nY), oOpts(opts), oProgress(progress),
154154
m_dfMinDistance2(opts.minDistance * opts.minDistance),
155155
m_dfMaxDistance2(opts.maxDistance * opts.maxDistance)
156156
{
@@ -225,6 +225,12 @@ void ViewshedExecutor::setOutput(Lines &lines, int pos, double dfZ)
225225
setOutputSd(lines, pos, dfZ);
226226
}
227227

228+
/// Set the output Z value depending on the observable height and computation mode
229+
/// in normal mode.
230+
///
231+
/// dfResult Reference to the result cell
232+
/// dfCellVal Reference to the current cell height. Replace with observable height.
233+
/// dfZ Minimum observable height at cell.
228234
void ViewshedExecutor::setOutputNormal(Lines &lines, int pos, double dfZ)
229235
{
230236
double &cur = lines.cur[pos];
@@ -242,6 +248,12 @@ void ViewshedExecutor::setOutputNormal(Lines &lines, int pos, double dfZ)
242248
cur = std::max(cur, dfZ);
243249
}
244250

251+
/// Set the output Z value depending on the observable height and computation when
252+
/// making an SD pass.
253+
///
254+
/// dfResult Reference to the result cell
255+
/// dfCellVal Reference to the current cell height. Replace with observable height.
256+
/// dfZ Minimum observable height at cell.
245257
void ViewshedExecutor::setOutputSd(Lines &lines, int pos, double dfZ)
246258
{
247259
double &cur = lines.cur[pos];

alg/viewshed/viewshed_executor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct Lines
5555

5656
class DummyBand : public GDALRasterBand
5757
{
58-
virtual CPLErr IReadBlock(int, int, void *) override;
58+
CPLErr IReadBlock(int, int, void *) override;
5959
};
6060

6161
class Progress;

0 commit comments

Comments
 (0)