[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Mar 25 19:06:11 UTC 2007
SVN commit 646451 by okellogg:
updateContent(): Use dynamic_cast in lieu of C-style pointer cast.
M +1 -1 cppheadercodeaccessormethod.cpp
M +1 -1 cppsourcecodeaccessormethod.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp #646450:646451
@@ -54,7 +54,7 @@
void CPPHeaderCodeAccessorMethod::updateContent( )
{
CodeClassField * parentField = getParentClassField();
- CPPCodeClassField * cppfield = (CPPCodeClassField*)parentField;
+ CPPCodeClassField * cppfield = dynamic_cast<CPPCodeClassField*>(parentField);
CodeGenPolicyExt *pe = UMLApp::app()->getPolicyExt();
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getAccessorsAreInline( );
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp #646450:646451
@@ -54,7 +54,7 @@
void CPPSourceCodeAccessorMethod::updateContent( )
{
CodeClassField * parentField = getParentClassField();
- CPPCodeClassField * cppfield = (CPPCodeClassField*)parentField;
+ CPPCodeClassField * cppfield = dynamic_cast<CPPCodeClassField*>(parentField);
CodeGenPolicyExt *pe = UMLApp::app()->getPolicyExt();
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getAccessorsAreInline( );
More information about the umbrello-devel
mailing list