[core] added template instances for Source.is<>().
This commit is contained in:
@@ -50,5 +50,10 @@ public:
|
||||
Impl* const impl;
|
||||
};
|
||||
|
||||
template <>
|
||||
inline bool Source::is<GeoJSONSource>() const {
|
||||
return type == SourceType::GeoJSON;
|
||||
}
|
||||
|
||||
} // namespace style
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -16,5 +16,10 @@ public:
|
||||
class Impl;
|
||||
};
|
||||
|
||||
template <>
|
||||
inline bool Source::is<RasterSource>() const {
|
||||
return type == SourceType::Raster;
|
||||
}
|
||||
|
||||
} // namespace style
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -16,5 +16,10 @@ public:
|
||||
class Impl;
|
||||
};
|
||||
|
||||
template <>
|
||||
inline bool Source::is<VectorSource>() const {
|
||||
return type == SourceType::Vector;
|
||||
}
|
||||
|
||||
} // namespace style
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user