Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] #5906 - added template instances for Source.is<>().
Browse files Browse the repository at this point in the history
  • Loading branch information
ivovandongen committed Aug 17, 2016
1 parent 8aa28a1 commit 305b761
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/mbgl/style/sources/geojson_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,10 @@ class GeoJSONSource : public Source {
Impl* const impl;
};

template <>
inline bool Source::is<GeoJSONSource>() const {
return type == SourceType::GeoJSON;
}

} // namespace style
} // namespace mbgl
5 changes: 5 additions & 0 deletions include/mbgl/style/sources/raster_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ class RasterSource : public Source {
class Impl;
};

template <>
inline bool Source::is<RasterSource>() const {
return type == SourceType::Raster;
}

} // namespace style
} // namespace mbgl
5 changes: 5 additions & 0 deletions include/mbgl/style/sources/vector_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ class VectorSource : public Source {
class Impl;
};

template <>
inline bool Source::is<VectorSource>() const {
return type == SourceType::Vector;
}

} // namespace style
} // namespace mbgl

0 comments on commit 305b761

Please sign in to comment.