1
/****************************************************************************
5
* COPYRIGHT (C) 2007 Laura Toma
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
*****************************************************************************/
20
#include "genericWindow.h"
22
/* ********************************************************************** */
23
/* ********************************************************************** */
25
/* if center of the wind is a pit, fill it */
28
fillPit(ElevationWindow& win) {
29
/* find min of the 8 neighbors */
30
elevation_type min = win.get(0);
31
for (int k=1; k<9; k++) {
32
if (k != 4 && win.get(k) < min) {
36
if (win.get(4) < min) {