diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-02-21 13:08:13 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-02-21 13:08:13 +0100 |
commit | e382cab17dd399ef851a4a2800a11dd7b9a69c15 (patch) | |
tree | ff54618a2124267ea45ecf227e0f43058cb34168 /include | |
parent | 4418f2d1c8f51ee268e2180c287abae0b8dbc574 (diff) | |
download | qtlocation-mapboxgl-e382cab17dd399ef851a4a2800a11dd7b9a69c15.tar.gz |
make implicit type conversions explicit
Diffstat (limited to 'include')
-rw-r--r-- | include/llmr/geometry/vertex_buffer.hpp | 2 | ||||
-rw-r--r-- | include/llmr/renderer/fill_bucket.hpp | 6 | ||||
-rw-r--r-- | include/llmr/renderer/line_bucket.hpp | 6 | ||||
-rw-r--r-- | include/llmr/renderer/point_bucket.hpp | 4 | ||||
-rw-r--r-- | include/llmr/style/style.hpp | 2 | ||||
-rw-r--r-- | include/llmr/util/pbf.hpp | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/include/llmr/geometry/vertex_buffer.hpp b/include/llmr/geometry/vertex_buffer.hpp index 9d053693c9..a9236992c1 100644 --- a/include/llmr/geometry/vertex_buffer.hpp +++ b/include/llmr/geometry/vertex_buffer.hpp @@ -17,7 +17,7 @@ public: * Returns the number of elements in this buffer. This is not the number of * bytes, but rather the number of coordinates with associated information. */ - uint32_t index() const; + size_t index() const; /* * Transfers this buffer to the GPU and binds the buffer to the GL context. diff --git a/include/llmr/renderer/fill_bucket.hpp b/include/llmr/renderer/fill_bucket.hpp index 86188e4c7c..166eff3faf 100644 --- a/include/llmr/renderer/fill_bucket.hpp +++ b/include/llmr/renderer/fill_bucket.hpp @@ -52,9 +52,9 @@ private: std::shared_ptr<LineElementsBuffer> lineElementsBuffer; // hold information on where the vertices are located in the FillBuffer - const uint32_t vertex_start; - const uint32_t triangle_elements_start; - const uint32_t line_elements_start; + const size_t vertex_start; + const size_t triangle_elements_start; + const size_t line_elements_start; VertexArrayObject<OutlineShader> array; std::vector<triangle_group_type> triangleGroups; std::vector<line_group_type> lineGroups; diff --git a/include/llmr/renderer/line_bucket.hpp b/include/llmr/renderer/line_bucket.hpp index 6ec9d960d8..17ee226cfb 100644 --- a/include/llmr/renderer/line_bucket.hpp +++ b/include/llmr/renderer/line_bucket.hpp @@ -47,9 +47,9 @@ private: std::shared_ptr<TriangleElementsBuffer> triangleElementsBuffer; std::shared_ptr<PointElementsBuffer> pointElementsBuffer; - const uint32_t vertex_start; - const uint32_t triangle_elements_start; - const uint32_t point_elements_start; + const size_t vertex_start; + const size_t triangle_elements_start; + const size_t point_elements_start; std::vector<triangle_group_type> triangleGroups; std::vector<point_group_type> pointGroups; diff --git a/include/llmr/renderer/point_bucket.hpp b/include/llmr/renderer/point_bucket.hpp index 9c8de8f88c..9da7edc30e 100644 --- a/include/llmr/renderer/point_bucket.hpp +++ b/include/llmr/renderer/point_bucket.hpp @@ -42,8 +42,8 @@ private: std::shared_ptr<PointVertexBuffer> vertexBuffer; VertexArrayObject<PointShader> array; - const uint32_t vertex_start; - uint32_t vertex_end = 0; + const size_t vertex_start; + size_t vertex_end = 0; }; } diff --git a/include/llmr/style/style.hpp b/include/llmr/style/style.hpp index d1212f9fe3..7a491d810d 100644 --- a/include/llmr/style/style.hpp +++ b/include/llmr/style/style.hpp @@ -22,7 +22,7 @@ public: Style(); void reset(); - void load(const uint8_t *const data, uint32_t bytes); + void load(const uint8_t *const data, size_t bytes); // This is commented out because it is not fully implemented yet. For now, // we keep using the protobuf stylesheet format diff --git a/include/llmr/util/pbf.hpp b/include/llmr/util/pbf.hpp index 132cc14354..2e99cd91cb 100644 --- a/include/llmr/util/pbf.hpp +++ b/include/llmr/util/pbf.hpp @@ -20,7 +20,7 @@ struct pbf { struct unknown_field_type_exception : exception {}; struct end_of_buffer_exception : exception {}; - inline pbf(const unsigned char *data, uint32_t length); + inline pbf(const unsigned char *data, size_t length); inline pbf(); inline operator bool() const; @@ -49,7 +49,7 @@ struct pbf { uint32_t tag = 0; }; -pbf::pbf(const unsigned char *data, uint32_t length) +pbf::pbf(const unsigned char *data, size_t length) : data(data), end(data + length), value(0), |