make implicit type conversions explicit

This commit is contained in:
Konstantin Käfer
2014-02-21 13:08:13 +01:00
parent 4418f2d1c8
commit e382cab17d
15 changed files with 40 additions and 40 deletions

View File

@@ -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.

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
};
}

View File

@@ -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

View File

@@ -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),