Skip to content

Commit c3a203f

Browse files
committed
Clean up whitespace errors
1 parent 64e0572 commit c3a203f

60 files changed

Lines changed: 693 additions & 701 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ before_install:
1616
sudo add-apt-repository -y ppa:boost-latest/ppa
1717
fi
1818
- sudo apt-get update -qq
19-
install:
19+
install:
2020
- sudo apt-get install -y -qq autoconf automake libtool make g++ libpq-dev libxml2-dev libbz2-dev libproj0 proj-bin libproj-dev # core deps
2121
- |-
2222
if [ "${BOOST_PPA}" = "false" ]; then

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ check_PROGRAMS = \
9696
tests/test-parse-options \
9797
tests/test-expire-tiles
9898

99-
tests_test_parse_xml2_SOURCES = tests/test-parse-xml2.cpp
99+
tests_test_parse_xml2_SOURCES = tests/test-parse-xml2.cpp
100100
tests_test_parse_xml2_LDADD = libosm2pgsql.la
101101
tests_test_middle_ram_SOURCES = tests/test-middle-ram.cpp tests/middle-tests.cpp
102102
tests_test_middle_ram_LDADD = libosm2pgsql.la

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To install on a Fedora system, use
5959

6060
```sh
6161
sudo yum install gcc-c++ boost-devel libxml2-devel geos-devel \
62-
postgresql-devel bzip2-devel proj-devel protobuf-compiler
62+
postgresql-devel bzip2-devel proj-devel protobuf-compiler
6363
```
6464

6565
Then you should be able to bootstrap the build system:

UTF8sanitizer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int sanitizerProcess(void *context, char *buffer, int len);
2121
* [ len = 5 ] [len = 1]
2222
* X1 X2 X3 X4 X5 X6
2323
*
24-
* OUTPUT: nothing is generated for first buffer
24+
* OUTPUT: nothing is generated for first buffer
2525
* This will itself cause caller to assume EOF (hopefully normal reader will read >> 5 bytes).
2626
* subsequent read of len=1 whille return all 6 bytes potentially causing output buffer overflow (and overwriting input data)
2727
*
@@ -85,7 +85,7 @@ xmlTextReaderPtr sanitizerOpen(const char *name)
8585
}
8686

8787

88-
int sanitizerProcess(void *context, char *buffer, int len)
88+
int sanitizerProcess(void *context, char *buffer, int len)
8989
{
9090
struct Context *ctx = (struct Context *)context;
9191
int current_char, i, out = 0;
@@ -99,10 +99,10 @@ int sanitizerProcess(void *context, char *buffer, int len)
9999
current_char=inputGetChar(ctx->file);
100100
if (inputEof(ctx->file))
101101
break;
102-
102+
103103
if ((current_char & 128) == 0) {
104104
/* Handle_ASCII_char(); */
105-
if (current_char == '\n')
105+
if (current_char == '\n')
106106
ctx->line++;
107107
else
108108
ctx->chars1++;
@@ -111,7 +111,7 @@ int sanitizerProcess(void *context, char *buffer, int len)
111111
fprintf(stderr, "Error at line %lld\n", ctx->line);
112112
buffer[out++] = '_';
113113
ctx->state = 1;
114-
}
114+
}
115115
/* buffer[out++] = current_char; */
116116
ctx->out_char[ctx->pend++] = current_char;
117117
} else if ((current_char & (128+64)) == 128) {
@@ -125,7 +125,7 @@ int sanitizerProcess(void *context, char *buffer, int len)
125125
}
126126
}
127127
} else {
128-
if (ctx->verbose)
128+
if (ctx->verbose)
129129
fprintf(stderr, "Error at line %lld\n", ctx->line);
130130
buffer[out++] = '_';
131131
ctx->state=1;

binarysearcharray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void binary_search_add(struct binary_search_array * array, int key,
9595

9696
struct binary_search_array * init_search_array(int capacity)
9797
{
98-
struct binary_search_array * array =
98+
struct binary_search_array * array =
9999
(struct binary_search_array *)
100100
calloc(1, sizeof(struct binary_search_array));
101101
array->array = (struct key_val_tuple *)calloc(capacity + 1, sizeof(struct key_val_tuple));

buffer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <cstdio>
88
#include <cstring>
99

10-
buffer::buffer()
10+
buffer::buffer()
1111
: buf(NULL), m_len(0), m_capacity(0) {
1212
}
1313

@@ -31,7 +31,7 @@ size_t buffer::printf(const char *format, ...) {
3131
va_start(ap, format);
3232
status = vsnprintf(buf, m_capacity, format, ap);
3333
va_end(ap);
34-
34+
3535
// negative return means an error occurred.
3636
if (status < 0) {
3737
fprintf(stderr, "Error returned from vsnprintf.");
@@ -71,7 +71,7 @@ size_t buffer::aprintf(const char *format, ...) {
7171
va_start(ap, format);
7272
status = vsnprintf(&buf[m_len], (m_capacity - m_len), format, ap);
7373
va_end(ap);
74-
74+
7575
// negative return means an error occurred.
7676
if (status < 0) {
7777
fprintf(stderr, "Error returned from vsnprintf.");
@@ -136,14 +136,14 @@ void buffer::realloc(size_t len) {
136136
// of allocations by requiring at least some increase in size
137137
// before needing to run again.
138138
size_t new_size = std::max(2 * m_capacity, len);
139-
139+
140140
// allocate a new buffer
141141
char *new_buf = (char *)malloc(new_size);
142142
if (new_buf == NULL) {
143143
fprintf(stderr, "Unable to allocate new temporary buffer.");
144144
util::exit_nicely();
145145
}
146-
146+
147147
// copy and free old buffer, if one was ever allocated, so that
148148
// we retain any content which was in the old buffer.
149149
if (buf != NULL) {

expire-tiles.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ void expire_tiles::from_line(double lon_a, double lat_a, double lon_b, double la
330330
hyp_len = sqrt(pow(x_len, 2) + pow(y_len, 2)); /* Pythagoras */
331331
x_step = x_len / hyp_len;
332332
y_step = y_len / hyp_len;
333-
333+
334334
for (step = 0; step <= hyp_len; step+= 0.4) {
335335
/* Interpolate points 1 tile width apart */
336336
next_step = step + 0.4;
@@ -339,7 +339,7 @@ void expire_tiles::from_line(double lon_a, double lat_a, double lon_b, double la
339339
y1 = tile_y_a + ((double)step * y_step);
340340
x2 = tile_x_a + ((double)next_step * x_step);
341341
y2 = tile_y_a + ((double)next_step * y_step);
342-
342+
343343
/* The line (x1,y1),(x2,y2) is up to 1 tile width long
344344
x1 will always be <= x2
345345
We could be smart and figure out the exact tiles intersected,
@@ -442,7 +442,7 @@ void expire_tiles::from_nodes_poly(const struct osmNode * nodes, int count, osmi
442442
double min_lat = 0.0;
443443
double max_lon = 0.0;
444444
double max_lat = 0.0;
445-
445+
446446
if (Options->expire_tiles_zoom < 0) return;
447447
for (i = 0; i < count; i++) {
448448
if ((! got_coords) || (nodes[i].lon < min_lon)) min_lon = nodes[i].lon;
@@ -502,7 +502,7 @@ int expire_tiles::from_db(table_t* table, osmid_t osm_id) {
502502
//bail if we dont care about expiry
503503
if (Options->expire_tiles_zoom < 0)
504504
return -1;
505-
505+
506506
//grab the geom for this id
507507
boost::shared_ptr<table_t::wkt_reader> wkts = table->get_wkt_reader(osm_id);
508508

expire-tiles.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct expire_tiles : public boost::noncopyable {
4747
// object, destroying the list in the other object.
4848
void merge_and_destroy(expire_tiles &);
4949

50-
private:
50+
private:
5151
void expire_tile(int x, int y);
5252
int normalise_tile_x_coord(int x);
5353
void from_line(double lon_a, double lat_a, double lon_b, double lat_b);

geometry-builder.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
# modify it under the terms of the GNU General Public License
99
# as published by the Free Software Foundation; either version 2
1010
# of the License, or (at your option) any later version.
11-
#
11+
#
1212
# This program is distributed in the hope that it will be useful,
1313
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
# GNU General Public License for more details.
16-
#
16+
#
1717
# You should have received a copy of the GNU General Public License
1818
# along with this program; if not, write to the Free Software
1919
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -130,7 +130,7 @@ geometry_builder::maybe_wkt_t geometry_builder::get_wkt_simple(const osmNode *no
130130
if (!geom->isValid()) {
131131
if (excludepoly) {
132132
throw std::runtime_error("Excluding broken polygon.");
133-
} else {
133+
} else {
134134
geom = geom_ptr(geom->buffer(0));
135135
}
136136
}
@@ -211,7 +211,7 @@ geometry_builder::maybe_wkts_t geometry_builder::get_wkt_split(const osmNode *no
211211
const Coordinate this_pt = coords->getAt(i);
212212
const Coordinate prev_pt = coords->getAt(i-1);
213213
const double delta = this_pt.distance(prev_pt);
214-
// figure out if the addition of this point would take the total
214+
// figure out if the addition of this point would take the total
215215
// length of the line in `segment` over the `split_at` distance.
216216
const size_t splits = std::floor((distance + delta) / split_at);
217217

@@ -289,7 +289,7 @@ int geometry_builder::parse_wkt(const char * wkt, struct osmNode *** xnodes, int
289289
CoordinateSequence * coords;
290290
size_t num_geometries;
291291
size_t i;
292-
292+
293293
*polygon = 0;
294294
try {
295295
geometry = reader.read(wkt_string);

geometry-builder.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
# modify it under the terms of the GNU General Public License
99
# as published by the Free Software Foundation; either version 2
1010
# of the License, or (at your option) any later version.
11-
#
11+
#
1212
# This program is distributed in the hope that it will be useful,
1313
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
# GNU General Public License for more details.
16-
#
16+
#
1717
# You should have received a copy of the GNU General Public License
1818
# along with this program; if not, write to the Free Software
1919
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -64,4 +64,4 @@ struct geometry_builder : public boost::noncopyable
6464
int excludepoly;
6565
};
6666

67-
#endif
67+
#endif

0 commit comments

Comments
 (0)