diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-21 14:29:25 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-21 17:23:15 -0700 |
commit | d4c98cabf3d2a8d224c9ef0acce02f8a6e1695a8 (patch) | |
tree | 267b6d7f2dbdc1a591def48875a901810bad7243 | |
parent | e898b0a459c5db5149e5b774cc22add5aceee983 (diff) | |
download | qtlocation-mapboxgl-d4c98cabf3d2a8d224c9ef0acce02f8a6e1695a8.tar.gz |
[core] Make Function constructor explicit
-rw-r--r-- | src/mbgl/style/function.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/style/function.hpp b/src/mbgl/style/function.hpp index 160f5be390..f28d71ebaa 100644 --- a/src/mbgl/style/function.hpp +++ b/src/mbgl/style/function.hpp @@ -18,8 +18,7 @@ public: using Stop = std::pair<float, T>; using Stops = std::vector<Stop>; - // TODO: make explicit - /* explicit */ Function(const T& constant) + explicit Function(const T& constant) : stops({{ 0, constant }}) {} explicit Function(const Stops& stops_, float base_) @@ -42,8 +41,7 @@ public: using Stop = std::pair<float, T>; using Stops = std::vector<Stop>; - // TODO: make explicit - /* explicit */ Function(const T& constant) + explicit Function(const T& constant) : stops({{ 0, constant }}) {} explicit Function(const Stops& stops_) |