Merge pull request #437 from mapbox/fix-gcc

Make linux fails
This commit is contained in:
Konstantin Käfer
2014-08-26 17:42:34 +02:00
8 changed files with 10 additions and 109 deletions

View File

@@ -166,10 +166,10 @@ float Collision::getPlacementScale(const GlyphBoxes &glyphs, float minPlacementS
float s4 = (ob.br.y - nb.tl.y + padding) /
(na.y - oa.y); // scale at which new box is to the bottom of old box
if (isnan(s1) || isnan(s2)) {
if (std::isnan(s1) || std::isnan(s2)) {
s1 = s2 = 1;
}
if (isnan(s3) || isnan(s4)) {
if (std::isnan(s3) || std::isnan(s4)) {
s3 = s4 = 1;
}

View File

@@ -95,7 +95,7 @@ rotatingRotatingCollisions(const CollisionRect &a, const CollisionRect &b,
std::vector<float> f;
for (size_t i = 0; i < c.size(); i++) {
// Check if they are close enough to collide
if (!isnan(c[i]) && d_sq <= e[i]) {
if (!std::isnan(c[i]) && d_sq <= e[i]) {
// So far, angles have been calulated as relative to the vector
// between anchors.
// Convert the angles to angles from north.