mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
More const references
This commit is contained in:
@@ -755,7 +755,7 @@ static std::vector<std::pair<double, double>> clip_poly1(std::vector<std::pair<d
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int ny,
|
std::string overzoom(const std::string &s, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||||
bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map<std::string, attribute_op> const &attribute_accum) {
|
bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map<std::string, attribute_op> const &attribute_accum) {
|
||||||
@@ -870,7 +870,7 @@ static struct preservecmp {
|
|||||||
}
|
}
|
||||||
} preservecmp;
|
} preservecmp;
|
||||||
|
|
||||||
std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int ny,
|
std::string overzoom(const mvt_tile &tile, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||||
bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map<std::string, attribute_op> const &attribute_accum) {
|
bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map<std::string, attribute_op> const &attribute_accum) {
|
||||||
|
|||||||
+2
-2
@@ -100,13 +100,13 @@ void visvalingam(drawvec &ls, size_t start, size_t end, double threshold, size_t
|
|||||||
int pnpoly(const drawvec &vert, size_t start, size_t nvert, long long testx, long long testy);
|
int pnpoly(const drawvec &vert, size_t start, size_t nvert, long long testx, long long testy);
|
||||||
double distance_from_line(long long point_x, long long point_y, long long segA_x, long long segA_y, long long segB_x, long long segB_y);
|
double distance_from_line(long long point_x, long long point_y, long long segA_x, long long segA_y, long long segB_x, long long segB_y);
|
||||||
|
|
||||||
std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int ny,
|
std::string overzoom(const mvt_tile &tile, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||||
bool demultiply, json_object *filter, bool preserve_input_order,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
std::unordered_map<std::string, attribute_op> const &attribute_accum);
|
std::unordered_map<std::string, attribute_op> const &attribute_accum);
|
||||||
|
|
||||||
std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int ny,
|
std::string overzoom(const std::string &s, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||||
bool demultiply, json_object *filter, bool preserve_input_order,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ int compress(std::string const &input, std::string &output, bool gz) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mvt_tile::decode(std::string &message, bool &was_compressed) {
|
bool mvt_tile::decode(const std::string &message, bool &was_compressed) {
|
||||||
layers.clear();
|
layers.clear();
|
||||||
std::string src;
|
std::string src;
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ struct mvt_tile {
|
|||||||
std::vector<mvt_layer> layers{};
|
std::vector<mvt_layer> layers{};
|
||||||
|
|
||||||
std::string encode();
|
std::string encode();
|
||||||
bool decode(std::string &message, bool &was_compressed);
|
bool decode(const std::string &message, bool &was_compressed);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool is_compressed(std::string const &data);
|
bool is_compressed(std::string const &data);
|
||||||
|
|||||||
Reference in New Issue
Block a user