Skip to content

Commit

Permalink
Explicitly unwrap unique_ptrs in dynamic_casts
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenLightning authored and nmwsharp committed Feb 7, 2024
1 parent fe1b143 commit 8a60630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions happly.h
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ class Element {

// Find the property
std::unique_ptr<Property>& prop = getPropertyPtr(propertyName);
TypedProperty<T>* castedProp = dynamic_cast<TypedProperty<T>*>(prop);
TypedProperty<T>* castedProp = dynamic_cast<TypedProperty<T>*>(prop.get());
if (castedProp) {
return castedProp->data;
}
Expand Down Expand Up @@ -994,7 +994,7 @@ class Element {

// Find the property
std::unique_ptr<Property>& prop = getPropertyPtr(propertyName);
TypedListProperty<T>* castedProp = dynamic_cast<TypedListProperty<T>*>(prop);
TypedListProperty<T>* castedProp = dynamic_cast<TypedListProperty<T>*>(prop.get());
if (castedProp) {
return unflattenList(castedProp->flattenedData, castedProp->flattenedIndexStart);
}
Expand Down

0 comments on commit 8a60630

Please sign in to comment.