More initializers

This commit is contained in:
Eric Fischer 2017-11-07 15:57:56 -08:00
parent 30aa422483
commit 0152db4a20
5 changed files with 72 additions and 72 deletions

View File

@ -22,13 +22,13 @@
#define MULTIPOLYGON 5
struct queued_feature {
protozero::pbf_reader pbf;
size_t dim;
double e;
std::vector<std::string> *keys;
std::vector<struct serialization_state> *sst;
int layer;
std::string layername;
protozero::pbf_reader pbf{};
size_t dim = 0;
double e = 0;
std::vector<std::string> *keys = NULL;
std::vector<struct serialization_state> *sst = NULL;
int layer = 0;
std::string layername = "";
};
static std::vector<queued_feature> feature_queue;
@ -196,8 +196,8 @@ drawvec readMultiPolygon(std::vector<long long> &coords, std::vector<int> &lengt
}
struct drawvec_type {
drawvec dv;
int type;
drawvec dv{};
int type = 0;
};
std::vector<drawvec_type> readGeometry(protozero::pbf_reader &pbf, size_t dim, double e, std::vector<std::string> &keys) {

View File

@ -71,8 +71,8 @@ int prevent[256];
int additional[256];
struct source {
std::string layer;
std::string file;
std::string layer = "";
std::string file = "";
};
size_t CPUS;
@ -437,34 +437,34 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const
}
struct read_parallel_arg {
int fd;
FILE *fp;
long long offset;
long long len;
volatile int *is_parsing;
int separator;
int fd = 0;
FILE *fp = NULL;
long long offset = 0;
long long len = 0;
volatile int *is_parsing = NULL;
int separator = 0;
const char *reading;
std::vector<struct reader> *readers;
volatile long long *progress_seq;
std::set<std::string> *exclude;
std::set<std::string> *include;
int exclude_all;
json_object *filter;
int maxzoom;
int basezoom;
int source;
std::vector<std::map<std::string, layermap_entry> > *layermaps;
int *initialized;
unsigned *initial_x;
unsigned *initial_y;
std::string layername;
bool uses_gamma;
std::map<std::string, int> const *attribute_types;
double *dist_sum;
size_t *dist_count;
bool want_dist;
bool filters;
const char *reading = NULL;
std::vector<struct reader> *readers = NULL;
volatile long long *progress_seq = NULL;
std::set<std::string> *exclude = NULL;
std::set<std::string> *include = NULL;
int exclude_all = 0;
json_object *filter = NULL;
int maxzoom = 0;
int basezoom = 0;
int source = 0;
std::vector<std::map<std::string, layermap_entry> > *layermaps = NULL;
int *initialized = NULL;
unsigned *initial_x = NULL;
unsigned *initial_y = NULL;
std::string layername = "";
bool uses_gamma = false;
std::map<std::string, int> const *attribute_types = NULL;
double *dist_sum = NULL;
size_t *dist_count = NULL;
bool want_dist = false;
bool filters = false;
};
void *run_read_parallel(void *v) {

View File

@ -90,8 +90,8 @@ struct reader {
long long file_bbox[4] = {0, 0, 0, 0};
struct stat geomst;
struct stat metast;
struct stat geomst {};
struct stat metast {};
char *geom_map = NULL;
};

View File

@ -322,20 +322,20 @@ double max(double a, double b) {
}
struct reader {
long long zoom;
long long x;
long long sorty;
long long y;
int pbf_count;
int z_flag;
long long zoom = 0;
long long x = 0;
long long sorty = 0;
long long y = 0;
int pbf_count = 0;
int z_flag = 0;
std::string data;
std::vector<std::string> pbf_path;
std::vector<std::string> large_zoom;
std::string data = "";
std::vector<std::string> pbf_path{};
std::vector<std::string> large_zoom{};
sqlite3 *db;
sqlite3_stmt *stmt;
struct reader *next;
sqlite3 *db = NULL;
sqlite3_stmt *stmt = NULL;
struct reader *next = NULL;
bool operator<(const struct reader &r) const {
if (zoom < r.zoom) {
@ -569,10 +569,10 @@ struct zxy {
long long x;
long long y;
zxy(long long _z, long long _x, long long _y) {
z = _z;
x = _x;
y = _y;
zxy(long long _z, long long _x, long long _y)
: z(_z),
x(_x),
y(_y) {
}
bool operator<(zxy const &other) const {
@ -599,18 +599,18 @@ struct zxy {
};
struct arg {
std::map<zxy, std::vector<std::string>> inputs;
std::map<zxy, std::string> outputs;
std::map<zxy, std::vector<std::string>> inputs{};
std::map<zxy, std::string> outputs{};
std::map<std::string, layermap_entry> *layermap;
std::map<std::string, layermap_entry> *layermap = NULL;
std::vector<std::string> *header;
std::map<std::string, std::vector<std::string>> *mapping;
std::set<std::string> *exclude;
std::set<std::string> *keep_layers;
std::set<std::string> *remove_layers;
int ifmatched;
json_object *filter;
std::vector<std::string> *header = NULL;
std::map<std::string, std::vector<std::string>> *mapping = NULL;
std::set<std::string> *exclude = NULL;
std::set<std::string> *keep_layers = NULL;
std::set<std::string> *remove_layers = NULL;
int ifmatched = 0;
json_object *filter = NULL;
};
void *join_worker(void *v) {

View File

@ -16,12 +16,12 @@ struct lonlat {
long long x;
long long y;
lonlat(int nop, double nlon, double nlat, long long nx, long long ny) {
this->op = nop;
this->lon = nlon;
this->lat = nlat;
this->x = nx;
this->y = ny;
lonlat(int nop, double nlon, double nlat, long long nx, long long ny)
: op(nop),
lon(nlon),
lat(nlat),
x(nx),
y(ny) {
}
};