diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-10-23 02:46:15 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-10-23 02:46:15 -0700 |
commit | 10cb83579feb53e7524ec899c0bff19161877669 (patch) | |
tree | a8bbac3634560412f03cd2404348c06ee7b47bfc /include | |
parent | 40a933ddce390b7926c25bb00a95f34fd76453ae (diff) | |
download | qtlocation-mapboxgl-10cb83579feb53e7524ec899c0bff19161877669.tar.gz |
gcc fixes
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/geometry/buffer.hpp | 6 | ||||
-rw-r--r-- | include/mbgl/util/pbf.hpp | 4 | ||||
-rw-r--r-- | include/mbgl/util/transition.hpp | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/include/mbgl/geometry/buffer.hpp b/include/mbgl/geometry/buffer.hpp index 446177d443..80cc6b9d1a 100644 --- a/include/mbgl/geometry/buffer.hpp +++ b/include/mbgl/geometry/buffer.hpp @@ -84,15 +84,15 @@ protected: } // Get a pointer to the item at a given index. - inline void *getElement(size_t index) { + inline void *getElement(size_t i) { if (array == nullptr) { throw std::runtime_error("Buffer was already deleted or doesn't contain elements"); } - if (index * itemSize >= pos) { + if (i * itemSize >= pos) { throw new std::runtime_error("Can't get element after array bounds"); } else { - return static_cast<char *>(array) + (index * itemSize); + return static_cast<char *>(array) + (i * itemSize); } } diff --git a/include/mbgl/util/pbf.hpp b/include/mbgl/util/pbf.hpp index ab4d60cd37..d017219a52 100644 --- a/include/mbgl/util/pbf.hpp +++ b/include/mbgl/util/pbf.hpp @@ -132,9 +132,9 @@ double pbf::float64() { std::string pbf::string() { uint32_t bytes = static_cast<uint32_t>(varint()); - const char *string = reinterpret_cast<const char*>(data); + const char *string_data = reinterpret_cast<const char*>(data); skipBytes(bytes); - return std::string(string, bytes); + return std::string(string_data, bytes); } bool pbf::boolean() { diff --git a/include/mbgl/util/transition.hpp b/include/mbgl/util/transition.hpp index 16adc41ceb..b78abfa8fd 100644 --- a/include/mbgl/util/transition.hpp +++ b/include/mbgl/util/transition.hpp @@ -36,8 +36,8 @@ protected: template <typename T> class ease_transition : public transition { public: - ease_transition(T from_, T to_, T& value_, timestamp start, timestamp duration) - : transition(start, duration), + ease_transition(T from_, T to_, T& value_, timestamp start_, timestamp duration_) + : transition(start_, duration_), from(from_), to(to_), value(value_) {} @@ -53,8 +53,8 @@ private: template <typename T> class timeout : public transition { public: - timeout(T final_value_, T& value_, timestamp start, timestamp duration) - : transition(start, duration), + timeout(T final_value_, T& value_, timestamp start_, timestamp duration_) + : transition(start_, duration_), final_value(final_value_), value(value_) {} |