More structure initializers

This commit is contained in:
Eric Fischer
2017-11-07 15:20:17 -08:00
parent 891f99f24c
commit ba62ab8596
10 changed files with 146 additions and 135 deletions
+7 -7
View File
@@ -6,25 +6,25 @@
#include "mvt.hpp"
struct type_and_string {
int type;
std::string string;
int type = 0;
std::string string = "";
bool operator<(const type_and_string &o) const;
bool operator!=(const type_and_string &o) const;
};
struct type_and_string_stats {
std::vector<type_and_string> sample_values; // sorted
std::vector<type_and_string> sample_values = std::vector<type_and_string>(); // sorted
double min = INFINITY;
double max = -INFINITY;
int type = 0;
};
struct layermap_entry {
size_t id;
std::map<std::string, type_and_string_stats> file_keys;
int minzoom;
int maxzoom;
size_t id = 0;
std::map<std::string, type_and_string_stats> file_keys = std::map<std::string, type_and_string_stats>();
int minzoom = 0;
int maxzoom = 0;
size_t points = 0;
size_t lines = 0;