From 6a554b501c4baa041c7f1edc81bfbd1b12c1c0a8 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Thu, 25 Jan 2024 10:32:33 -0800 Subject: [PATCH] More const references --- clip.cpp | 4 ++-- geometry.hpp | 4 ++-- mvt.cpp | 2 +- mvt.hpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clip.cpp b/clip.cpp index cd5cd6e5..0cdb3926 100644 --- a/clip.cpp +++ b/clip.cpp @@ -755,7 +755,7 @@ static std::vector> clip_poly1(std::vector const &keep, bool do_compress, std::vector> *next_overzoomed_tiles, bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map const &attribute_accum) { @@ -870,7 +870,7 @@ static struct 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 const &keep, bool do_compress, std::vector> *next_overzoomed_tiles, bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map const &attribute_accum) { diff --git a/geometry.hpp b/geometry.hpp index d1006002..cb764992 100644 --- a/geometry.hpp +++ b/geometry.hpp @@ -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); 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 const &keep, bool do_compress, std::vector> *next_overzoomed_tiles, bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map 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 const &keep, bool do_compress, std::vector> *next_overzoomed_tiles, bool demultiply, json_object *filter, bool preserve_input_order, diff --git a/mvt.cpp b/mvt.cpp index 779d8214..527199ad 100644 --- a/mvt.cpp +++ b/mvt.cpp @@ -110,7 +110,7 @@ int compress(std::string const &input, std::string &output, bool gz) { 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(); std::string src; diff --git a/mvt.hpp b/mvt.hpp index 2f25ddc9..a0b3c123 100644 --- a/mvt.hpp +++ b/mvt.hpp @@ -154,7 +154,7 @@ struct mvt_tile { std::vector layers{}; 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);