Skip to content

Commit

Permalink
rev: use wkb_geom_t enum for switch
Browse files Browse the repository at this point in the history
changes per #522 (comment)
  • Loading branch information
program-- authored and mattw-nws committed Jul 18, 2023
1 parent 0d60f58 commit b572f04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/geopackage/wkb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ typename wkb::geometry wkb::read(const byte_vector& buffer)
utils::copy_from(buffer, index, type, order);

switch(type) {
case 1:
case wkb_geom_t::point:
return read_point(buffer, index, order);
case 2:
case wkb_geom_t::linestring:
return read_linestring(buffer, index, order);
case 3:
case wkb_geom_t::polygon:
return read_polygon(buffer, index, order);
case 4:
case wkb_geom_t::multipoint:
return read_multipoint(buffer, index, order);
case 5:
case wkb_geom_t::multilinestring:
return read_multilinestring(buffer, index, order);
case 6:
case wkb_geom_t::multipolygon:
return read_multipolygon(buffer, index, order);
default:
throw std::runtime_error(
Expand Down

0 comments on commit b572f04

Please sign in to comment.