blob: 59a8545911a1d75e0acac4a0f6ac2839652c9981 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include <mbgl/util/optional.hpp>
namespace mbgl {
template <class T>
class PaintPropertyStatistics {
public:
optional<T> max() const { return {}; }
void add(const T&) {}
};
template <>
class PaintPropertyStatistics<float> {
public:
optional<float> max() const {
return _max;
}
void add(float value) {
_max = _max ? std::max(*_max, value) : value;
}
private:
optional<float> _max;
};
} // namespace mbgl
|