Skip to content

Commit 62a83b2

Browse files
committed
odb: allow dbOrientType str to be MZ
Signed-off-by: Osama <[email protected]>
1 parent 6ea3052 commit 62a83b2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/odb/src/db/dbTypes.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,20 @@ std::optional<dbOrientType3D> dbOrientType3D::fromString(
192192
const std::string orient)
193193
{
194194
std::string orient_str = orient;
195-
bool flipZ = false;
195+
bool mirror_z = false;
196196
// check if the orient string contains "MZ"
197+
if (orient_str == "MZ") {
198+
return dbOrientType3D(dbOrientType::R0, true);
199+
}
197200
if (orient_str.find("MZ_") != std::string::npos) {
198-
flipZ = true;
201+
mirror_z = true;
199202
orient_str = orient_str.erase(orient_str.find("MZ_"), 3);
200203
}
201204
auto opt = dbOrientType::fromString(orient_str.c_str());
202205
if (!opt.has_value()) {
203206
return std::nullopt;
204207
}
205-
return dbOrientType3D(opt.value(), flipZ);
208+
return dbOrientType3D(opt.value(), mirror_z);
206209
}
207210

208211
dbOrientType3D::dbOrientType3D(const char* orient)

0 commit comments

Comments
 (0)