don't use certain STL functions

some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
This commit is contained in:
Konstantin Käfer
2015-08-03 15:01:35 +02:00
parent ab7456075c
commit 78ec33320f
34 changed files with 69 additions and 51 deletions

View File

@@ -24,6 +24,7 @@
#include <mbgl/util/worker.hpp>
#include <mbgl/util/texture_pool.hpp>
#include <mbgl/util/exception.hpp>
#include <mbgl/util/string.hpp>
#include <algorithm>
@@ -170,7 +171,7 @@ void MapContext::updateAnnotationTiles(const std::unordered_set<TileID, TileID::
// create (if necessary) layers and buckets for each shape
for (const auto &shapeAnnotationID : annotationManager->getOrderedShapeAnnotations()) {
const std::string shapeLayerID = shapeID + "." + std::to_string(shapeAnnotationID);
const std::string shapeLayerID = shapeID + "." + util::toString(shapeAnnotationID);
const auto layer_it = std::find_if(style->layers.begin(), style->layers.end(),
[&shapeLayerID](util::ptr<StyleLayer> layer) {