Skip to content

Commit

Permalink
use const static inline vectors, not arrays, in ttl/Constants.h to av…
Browse files Browse the repository at this point in the history
…oid issues with implementation-dependend initialization
  • Loading branch information
patrickbr committed Oct 11, 2024
1 parent df1e6a5 commit 2209fc0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions include/osm2rdf/ttl/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ inline std::string LITERAL__NO;
inline std::string LITERAL__YES;

// Arrays holding values depending on the used dataset
inline std::string DATASET_ID[2] = {"osm", "ohm"};
inline std::string NODE_NAMESPACE[2] = {NAMESPACE__OSM_NODE,
NAMESPACE__OHM_NODE};
inline std::string RELATION_NAMESPACE[2] = {NAMESPACE__OSM_RELATION,
NAMESPACE__OHM_RELATION};
inline std::string WAY_NAMESPACE[2] = {NAMESPACE__OSM_WAY, NAMESPACE__OHM_WAY};
const static inline std::vector<std::string> DATASET_ID = {"osm", "ohm"};
const static inline std::vector<std::string> NODE_NAMESPACE = {
NAMESPACE__OSM_NODE, NAMESPACE__OHM_NODE};
const static inline std::vector<std::string> RELATION_NAMESPACE = {
NAMESPACE__OSM_RELATION, NAMESPACE__OHM_RELATION};
const static inline std::vector<std::string> WAY_NAMESPACE = {
NAMESPACE__OSM_WAY, NAMESPACE__OHM_WAY};

} // namespace osm2rdf::ttl::constants

Expand Down

0 comments on commit 2209fc0

Please sign in to comment.