Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing with their qobject_cast.
This commit is contained in:
committed by
Chris Hennes
parent
307a4661af
commit
35a9673a75
@@ -1301,7 +1301,7 @@ std::string PropertyComplexGeoData::getElementMapVersion(bool) const
|
||||
if (!data) {
|
||||
return std::string();
|
||||
}
|
||||
auto owner = Base::freecad_dynamic_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 = Base::freecad_dynamic_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 = Base::freecad_dynamic_cast<DocumentObject>(getContainer());
|
||||
auto owner = freecad_cast<DocumentObject>(getContainer());
|
||||
if (owner && owner->getDocument()
|
||||
&& !owner->getDocument()->testStatus(App::Document::PartialDoc)) {
|
||||
owner->getDocument()->addRecomputeObject(owner);
|
||||
|
||||
Reference in New Issue
Block a user