Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Fix geometry_util compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
zmiao authored and alexshalamov committed Apr 30, 2020
1 parent be37d80 commit 0ed719e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/mbgl/util/geometry_util.hpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#pragma once

#include <array>
#include <limits>
#include <mbgl/util/geometry.hpp>

namespace mbgl {

// contains minX, minY, maxX, maxY
template <typename T>
using GeometryBBox = std::array<T, 4>;
const GeometryBBox<int64_t> DefaultWithinBBox = std::array<int64_t, 4>{std::numeric_limits<int64_t>::max(),
std::numeric_limits<int64_t>::max(),
std::numeric_limits<int64_t>::min(),
std::numeric_limits<int64_t>::min()};

const GeometryBBox<double> DefaultDistanceBBox = std::array<double, 4>{std::numeric_limits<double>::infinity(),
std::numeric_limits<double>::infinity(),
-std::numeric_limits<double>::infinity(),
-std::numeric_limits<double>::infinity()};
const GeometryBBox<int64_t> DefaultWithinBBox = std::array<int64_t, 4>{{std::numeric_limits<int64_t>::max(),
std::numeric_limits<int64_t>::max(),
std::numeric_limits<int64_t>::min(),
std::numeric_limits<int64_t>::min()}};

const GeometryBBox<double> DefaultDistanceBBox = std::array<double, 4>{{std::numeric_limits<double>::infinity(),
std::numeric_limits<double>::infinity(),
-std::numeric_limits<double>::infinity(),
-std::numeric_limits<double>::infinity()}};

template <typename T>
void updateBBox(GeometryBBox<T>& bbox, const Point<T>& p);
Expand Down

0 comments on commit 0ed719e

Please sign in to comment.