Skip to content

Commit f245d2d

Browse files
committed
if scoping, return nullptr
1 parent 22b881b commit f245d2d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Core/src/Geometry/GeometryModuleLoader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ std::shared_ptr<TrackingGeometry> loadGeometryModuleImpl(
9393

9494
// Validate user_data_type: both sides must agree on whether userData is
9595
// needed and what type it is.
96-
const char* actualType = descriptor->user_data_type;
97-
if (!((expectedUserDataType == nullptr && actualType == nullptr) ||
96+
if (const char* actualType = descriptor->user_data_type;
97+
!((expectedUserDataType == nullptr && actualType == nullptr) ||
9898
(expectedUserDataType != nullptr && actualType != nullptr &&
9999
std::strcmp(actualType, expectedUserDataType) == 0))) {
100100
if (actualType == nullptr) {

docs/examples/geometry_module_template.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ std::unique_ptr<Acts::TrackingGeometry> buildMyGeometry(
1717
const Acts::Logger& logger) {
1818
ACTS_INFO("Building my geometry");
1919
// ... construct and return a TrackingGeometry ...
20-
throw std::logic_error("not implemented");
20+
return nullptr;
2121
}
2222
} // namespace
2323

docs/examples/geometry_module_template_dd4hep.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ std::unique_ptr<Acts::TrackingGeometry> buildMyGeometry(
2020
(void)detector;
2121
ACTS_INFO("Building DD4hep geometry");
2222
// ... use detector to build and return a TrackingGeometry ...
23-
throw std::logic_error("not implemented");
23+
return nullptr;
2424
}
2525
} // namespace
2626

0 commit comments

Comments
 (0)