blob: 9b382b7400e283d7a0849f61659009836fb5671f (
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/rotation.hpp>
#include <mbgl/style/conversion/constant.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
|