Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace: ``` s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/ s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/ ``` To regenerate if needed.
This commit is contained in:
@@ -66,7 +66,7 @@ bool ViewProviderDressUp::setEdit(int ModNum) {
|
||||
if (ModNum == ViewProvider::Default) {
|
||||
// Here we should prevent edit of a Feature with missing base
|
||||
// Otherwise it could call unhandled exception.
|
||||
PartDesign::DressUp* dressUp = static_cast<PartDesign::DressUp*>(getObject());
|
||||
PartDesign::DressUp* dressUp = getObject<PartDesign::DressUp>();
|
||||
assert (dressUp);
|
||||
if (dressUp->getBaseObject (/*silent =*/ true)) {
|
||||
return ViewProvider::setEdit(ModNum);
|
||||
@@ -86,7 +86,7 @@ bool ViewProviderDressUp::setEdit(int ModNum) {
|
||||
|
||||
void ViewProviderDressUp::highlightReferences(const bool on)
|
||||
{
|
||||
PartDesign::DressUp* pcDressUp = static_cast<PartDesign::DressUp*>(getObject());
|
||||
PartDesign::DressUp* pcDressUp = getObject<PartDesign::DressUp>();
|
||||
Part::Feature* base = pcDressUp->getBaseObject (/*silent =*/ true);
|
||||
if (!base)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user