[core] added template instances for Source.is<>().

This commit is contained in:
Ivo van Dongen
2016-08-17 19:02:48 +02:00
parent 9fe22bc0cd
commit 26bdcadf7e
3 changed files with 15 additions and 0 deletions

View File

@@ -50,5 +50,10 @@ public:
Impl* const impl;
};
template <>
inline bool Source::is<GeoJSONSource>() const {
return type == SourceType::GeoJSON;
}
} // namespace style
} // namespace mbgl

View File

@@ -16,5 +16,10 @@ public:
class Impl;
};
template <>
inline bool Source::is<RasterSource>() const {
return type == SourceType::Raster;
}
} // namespace style
} // namespace mbgl

View File

@@ -16,5 +16,10 @@ public:
class Impl;
};
template <>
inline bool Source::is<VectorSource>() const {
return type == SourceType::Vector;
}
} // namespace style
} // namespace mbgl