Skip to content

Commit 9697e69

Browse files
committed
dynamic_cast -> checked_cast
1 parent 0ae5b66 commit 9697e69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/src/arrow/array/builder_nested.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Status ListBuilder::FinishInternal(std::shared_ptr<ArrayData>* out) {
100100
}
101101

102102
// If the type has not been specified in the constructor, infer it
103-
if (!std::dynamic_pointer_cast<ListType>(type_)->value_type()) {
103+
if (!arrow::internal::checked_cast<ListType&>(*type_).value_type()) {
104104
type_ = std::static_pointer_cast<DataType>(
105105
std::make_shared<ListType>(value_builder_->type()));
106106
}

0 commit comments

Comments
 (0)