mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Retrieving keys and values
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
#define POOL_WIDTH 256
|
||||
|
||||
static int hash(char *s) {
|
||||
static int hash(const char *s) {
|
||||
int h = 0;
|
||||
for (; *s; s++) {
|
||||
h = h * 37 + *s;
|
||||
@@ -57,7 +57,7 @@ struct pool_val *pool(struct pool *p, char *s, int type) {
|
||||
return *v;
|
||||
}
|
||||
|
||||
int is_pooled(struct pool *p, char *s, int type) {
|
||||
int is_pooled(struct pool *p, const char *s, int type) {
|
||||
int h = hash(s);
|
||||
struct pool_val **v = &(p->vals[h]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user