-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* Copyright 2011-2021 Bernhard R. Fischer, 4096R/8E24F29D <[email protected]> | ||
/* Copyright 2011-2022 Bernhard R. Fischer, 4096R/8E24F29D <[email protected]> | ||
* | ||
* This file is part of Smrender. | ||
* | ||
|
@@ -15,10 +15,12 @@ | |
* along with Smrender. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/*! This program reads an OSM/XML file and parses it into an object tree. | ||
/*! \file smloadosm.c | ||
* This program reads an OSM/XML file and parses it into an object tree. | ||
* Originally it was written for smfilter and was reused and adapted. | ||
* | ||
* @author Bernhard R. Fischer | ||
* \author Bernhard R. Fischer, <[email protected]> | ||
* \date 2022/03/08 | ||
*/ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
@@ -159,7 +161,7 @@ static int update_stats(const osm_obj_t *o, struct dstats *ds) | |
{ | ||
case OSM_NODE: | ||
update_node_stats((osm_node_t*) o, ds); | ||
// intentionally there's no break | ||
/* fall through */ | ||
case OSM_WAY: | ||
case OSM_REL: | ||
ds->cnt[o->type]++; | ||
|
@@ -622,7 +624,7 @@ int read_osm_file(hpx_ctrl_t *ctl, bx_node_t **tree, const struct filter *fi, st | |
|
||
case OSM_REL: | ||
for (int i = 0; i < ((osm_rel_t*) obj)->mem_cnt; i++) | ||
if (get_object(((osm_rel_t*) obj)->mem[i].type, ((osm_rel_t*) obj)->mem[i].type) == NULL) | ||
if (get_object(((osm_rel_t*) obj)->mem[i].type, ((osm_rel_t*) obj)->mem[i].id) == NULL) | ||
{ | ||
memmove(&((osm_rel_t*) obj)->mem[i], &((osm_rel_t*) obj)->mem[i + 1], | ||
(((osm_rel_t*) obj)->mem_cnt - i - 1) * sizeof(*((osm_rel_t*) obj)->mem)); | ||
|