Skip to content

Commit 0541269

Browse files
committed
Bugfix
1 parent 303f541 commit 0541269

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/dsm/dsm.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
static constexpr uint8_t DSM_VERSION_MAJOR = 2;
88
static constexpr uint8_t DSM_VERSION_MINOR = 1;
9-
static constexpr uint8_t DSM_VERSION_PATCH = 5;
9+
static constexpr uint8_t DSM_VERSION_PATCH = 6;
1010

1111
#define DSM_VERSION \
1212
std::format("{}.{}.{}", DSM_VERSION_MAJOR, DSM_VERSION_MINOR, DSM_VERSION_PATCH)

src/dsm/headers/Graph.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@ namespace dsm {
5151
if (m_streets.contains(newStreetId)) {
5252
throw std::invalid_argument(buildLog("Street with same id already exists."));
5353
}
54-
auto newStreet = Street(newStreetId, *street);
55-
m_streets.emplace(newStreetId, std::make_unique<Street>(newStreet));
54+
if (street->isSpire()) {
55+
m_streets.emplace(
56+
newStreetId,
57+
std::make_unique<SpireStreet>(SpireStreet{newStreetId, *street}));
58+
} else {
59+
m_streets.emplace(newStreetId,
60+
std::make_unique<Street>(Street{newStreetId, *street}));
61+
}
5662
newStreetIds.emplace(streetId, newStreetId);
5763
}
5864
for (const auto& [nodeId, node] : m_nodes) {

0 commit comments

Comments
 (0)