blob: 11431437ddf75ae6e1ca465d586bad2c7c3d7145 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <mbgl/style/conversion/constant.hpp>
#include <mbgl/style/conversion/rotation.hpp>
#include <mbgl/style/conversion_impl.hpp>
namespace mbgl {
namespace style {
namespace conversion {
optional<style::Rotation> Converter<style::Rotation>::operator()(const Convertible& value, Error& error) const {
optional<double> converted = toDouble(value);
if (!converted) {
error.message = "value must be a number";
return nullopt;
}
return {*converted};
}
} // namespace conversion
} // namespace style
} // namespace mbgl
|