[core] Fix google-explicit-constructor errors

As reported by clang-tidy-8.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-27 17:43:37 +02:00
parent 65f4df5190
commit 62b543e44a
10 changed files with 12 additions and 20 deletions

View File

@@ -70,8 +70,7 @@ const GeometryCollection& AnnotationTileFeature::getGeometries() const {
class AnnotationTileLayerData {
public:
AnnotationTileLayerData(std::string name_) : name(std::move(name_)) {
}
explicit AnnotationTileLayerData(std::string name_) : name(std::move(name_)) {}
const std::string name;
std::vector<std::shared_ptr<const AnnotationTileFeatureData>> features;

View File

@@ -33,7 +33,7 @@ bool operator==(const VarargsType& lhs, const VarargsType& rhs) {
template <typename T>
struct Varargs : std::vector<T> {
template <class... Args>
Varargs(Args&&... args) : std::vector<T>(std::forward<Args>(args)...) {}
explicit Varargs(Args&&... args) : std::vector<T>(std::forward<Args>(args)...) {}
};
namespace detail {

View File

@@ -12,7 +12,7 @@ public:
const Feature& feature;
mutable optional<GeometryCollection> geometry;
GeoJSONFeature(const Feature& feature_) : feature(feature_) {}
explicit GeoJSONFeature(const Feature& feature_) : feature(feature_) {}
GeoJSONFeature(const Feature& feature_, const CanonicalTileID& canonical) : feature(feature_) {
geometry = convertGeometry(feature.geometry, canonical);
// https://github.com/mapbox/geojson-vt-cpp/issues/44