fixed memory leak
[platform/core/location/maps-plugin-mapzen.git] / src / mapzen / tangram / types.h
1 #pragma once
2
3 #include <vector>
4
5 namespace Tangram {
6
7 struct Range {
8     int start;
9     int length;
10
11     int end() const { return start + length; }
12
13     Range(int _start, int _length) : start(_start), length(_length) {}
14
15     Range() : start(0), length(0) {}
16 };
17
18 struct LngLat {
19     LngLat() {}
20     LngLat(double _lon, double _lat) : longitude(_lon), latitude(_lat) {}
21
22     LngLat(const LngLat& _other) = default;
23     LngLat(LngLat&& _other) = default;
24     LngLat& operator=(const LngLat& _other) = default;
25     LngLat& operator=(LngLat&& _other) = default;
26
27     bool operator==(const LngLat& _other) {
28         return longitude == _other.longitude &&
29                latitude == _other.latitude;
30     }
31
32     double longitude = 0.0;
33     double latitude = 0.0;
34 };
35
36 typedef std::vector<LngLat> Coordinates;
37
38 typedef uint32_t MarkerID;
39
40 }