Skip to content

Commit 8a60630

Browse files
GreenLightningnmwsharp
authored andcommitted
Explicitly unwrap unique_ptrs in dynamic_casts
1 parent fe1b143 commit 8a60630

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

happly.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ class Element {
951951

952952
// Find the property
953953
std::unique_ptr<Property>& prop = getPropertyPtr(propertyName);
954-
TypedProperty<T>* castedProp = dynamic_cast<TypedProperty<T>*>(prop);
954+
TypedProperty<T>* castedProp = dynamic_cast<TypedProperty<T>*>(prop.get());
955955
if (castedProp) {
956956
return castedProp->data;
957957
}
@@ -994,7 +994,7 @@ class Element {
994994

995995
// Find the property
996996
std::unique_ptr<Property>& prop = getPropertyPtr(propertyName);
997-
TypedListProperty<T>* castedProp = dynamic_cast<TypedListProperty<T>*>(prop);
997+
TypedListProperty<T>* castedProp = dynamic_cast<TypedListProperty<T>*>(prop.get());
998998
if (castedProp) {
999999
return unflattenList(castedProp->flattenedData, castedProp->flattenedIndexStart);
10001000
}

0 commit comments

Comments
 (0)