Skip to content

Commit

Permalink
Merge pull request #390 from Maxxen/dev
Browse files Browse the repository at this point in the history
check version on type too
  • Loading branch information
Maxxen authored Sep 6, 2024
2 parents 662cd19 + 3ee7d1e commit 58e0fcd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spatial/include/spatial/core/geometry/geometry_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ class geometry_t {

GeometryType GetType() const {
// return the type
return Load<GeometryType>(const_data_ptr_cast(data.GetPrefix()));
const auto type = Load<GeometryType>(const_data_ptr_cast(data.GetPrefix()));
const auto props = Load<GeometryProperties>(const_data_ptr_cast(data.GetPrefix() + 1));
props.CheckVersion();
return type;
}

GeometryProperties GetProperties() const {
Expand Down

0 comments on commit 58e0fcd

Please sign in to comment.