Base: Use explicit pointer syntax for freecad_cast (#20694)

* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
This commit is contained in:
Kacper Donat
2025-04-11 16:11:33 +02:00
committed by GitHub
parent 581fa12e45
commit b300c80b90
73 changed files with 305 additions and 304 deletions

View File

@@ -1301,7 +1301,7 @@ std::string PropertyComplexGeoData::getElementMapVersion(bool) const
if (!data) {
return std::string();
}
auto owner = freecad_cast<DocumentObject>(getContainer());
auto owner = freecad_cast<DocumentObject*>(getContainer());
std::ostringstream ss;
if (owner && owner->getDocument() && owner->getDocument()->getStringHasher() == data->Hasher) {
ss << "1.";
@@ -1319,7 +1319,7 @@ bool PropertyComplexGeoData::checkElementMapVersion(const char* ver) const
if (!data) {
return false;
}
auto owner = freecad_cast<DocumentObject>(getContainer());
auto owner = freecad_cast<DocumentObject*>(getContainer());
std::ostringstream ss;
const char* prefix;
if (owner && owner->getDocument() && owner->getDocument()->getStringHasher() == data->Hasher) {
@@ -1340,7 +1340,7 @@ void PropertyComplexGeoData::afterRestore()
auto data = getComplexData();
if (data && data->isRestoreFailed()) {
data->resetRestoreFailure();
auto owner = freecad_cast<DocumentObject>(getContainer());
auto owner = freecad_cast<DocumentObject*>(getContainer());
if (owner && owner->getDocument()
&& !owner->getDocument()->testStatus(App::Document::PartialDoc)) {
owner->getDocument()->addRecomputeObject(owner);