[Problem] Klocwork issues
[Cause] 1. data members are not initialized in constructor
2. values of variables is never used after initialization
3. unreachable code
[Solution]
Change-Id: Iee48bfedb3e5c2da14dfdfbb957dca62d83d84ec
20 files changed:
{
if( Property::INVALID_INDEX == index )
{
{
if( Property::INVALID_INDEX == index )
{
- index = actor.RegisterProperty( key, value );
+ actor.RegisterProperty( key, value );
default:
{
DALI_ASSERT_ALWAYS( !"Property type incorrect" );
default:
{
DALI_ASSERT_ALWAYS( !"Property type incorrect" );
- return Property::Value();
void Builder::LoadFromString( std::string const& data, Dali::Toolkit::Builder::UIFormat format )
{
void Builder::LoadFromString( std::string const& data, Dali::Toolkit::Builder::UIFormat format )
{
- DALI_ASSERT_ALWAYS( format == Dali::Toolkit::Builder::JSON && "Currently only JSON is supported" );
-
// parser to get constants and includes only
Dali::Toolkit::JsonParser parser = Dali::Toolkit::JsonParser::New();
// parser to get constants and includes only
Dali::Toolkit::JsonParser parser = Dali::Toolkit::JsonParser::New();
{
f = IsFloat( IsChild(child, "min") );
}
{
f = IsFloat( IsChild(child, "min") );
}
DALI_ASSERT_ALWAYS(f && "Notification condition for arg0 not specified");
DALI_ASSERT_ALWAYS(f && "Notification condition for arg0 not specified");
- if(f)
- {
- return *f;
- }
- else
- {
- return 0.f;
- }
{
f = IsFloat( IsChild(child, "max") );
}
{
f = IsFloat( IsChild(child, "max") );
}
DALI_ASSERT_ALWAYS(f && "Notification condition for arg1 not specified");
DALI_ASSERT_ALWAYS(f && "Notification condition for arg1 not specified");
- if(f)
- {
- return *f;
- }
- else
- {
- return 0.f;
- }
CheckBoxButton::CheckBoxButton()
: Button(),
mChecked( false ),
CheckBoxButton::CheckBoxButton()
: Button(),
mChecked( false ),
- mClickActionPerforming(false)
+ mClickActionPerforming(false),
+ mUseFadeAnimationProperty(Property::INVALID_INDEX),
+ mUseCheckAnimationProperty(Property::INVALID_INDEX)
{
// Creates specific painter.
mPainter = new CheckBoxButtonDefaultPainter();
{
// Creates specific painter.
mPainter = new CheckBoxButtonDefaultPainter();
mShowing(false),
mState(Toolkit::Popup::POPUP_NONE), // Initially, the popup state should not be set, it's set in OnInitialize
mAlterAddedChild(false),
mShowing(false),
mState(Toolkit::Popup::POPUP_NONE), // Initially, the popup state should not be set, it's set in OnInitialize
mAlterAddedChild(false),
- mPopupStyle(PopupStylePtr(&style))
+ mPopupStyle(PopupStylePtr(&style)),
+ mPropertyTitle(Property::INVALID_INDEX),
+ mPropertyState(Property::INVALID_INDEX)
{
SetKeyboardNavigationSupport( true );
}
{
SetKeyboardNavigationSupport( true );
}
Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
if(propertyIsFocusGroup == Property::INVALID_INDEX)
{
Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
if(propertyIsFocusGroup == Property::INVALID_INDEX)
{
- propertyIsFocusGroup = actor.RegisterProperty(IS_FOCUS_GROUP, isFocusGroup);
+ actor.RegisterProperty(IS_FOCUS_GROUP, isFocusGroup);
Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
if(propertyActorFocusable == Property::INVALID_INDEX)
{
Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
if(propertyActorFocusable == Property::INVALID_INDEX)
{
- propertyActorFocusable = actor.RegisterProperty(ACTOR_FOCUSABLE, focusable);
+ actor.RegisterProperty(ACTOR_FOCUSABLE, focusable);
Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP_PROPERTY_NAME);
if(propertyIsFocusGroup == Property::INVALID_INDEX)
{
Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP_PROPERTY_NAME);
if(propertyIsFocusGroup == Property::INVALID_INDEX)
{
- propertyIsFocusGroup = actor.RegisterProperty(IS_FOCUS_GROUP_PROPERTY_NAME, isFocusGroup);
+ actor.RegisterProperty(IS_FOCUS_GROUP_PROPERTY_NAME, isFocusGroup);
mCurrentUniform( 0 ),
mDensity( 5 )
{
mCurrentUniform( 0 ),
mDensity( 5 )
{
+ // Calculate how many BubbleEffect shaders are required
+ if( mTotalNumOfBubble>100 )
+ {
+ mNumBubblePerShader = 100;
+ mNumShader = mTotalNumOfBubble / 100;
+ }
+ else
+ {
+ mNumBubblePerShader = mTotalNumOfBubble;
+ mNumShader = 1;
+ }
}
BubbleEmitter::~BubbleEmitter()
}
BubbleEmitter::~BubbleEmitter()
// Generate the material object, which is used by all meshActors
GenMaterial();
// Generate the material object, which is used by all meshActors
GenMaterial();
- // Calculate how many BubbleEffect shaders are required
- if( mTotalNumOfBubble>100 )
- {
- mNumBubblePerShader = 100;
- mNumShader = mTotalNumOfBubble / 100;
- }
- else
- {
- mNumBubblePerShader = mTotalNumOfBubble;
- mNumShader = 1;
- }
-
mMesh.resize( mNumShader );
mMeshActor.resize( mNumShader );
mEffect.resize( mNumShader );
mMesh.resize( mNumShader );
mMeshActor.resize( mNumShader );
mEffect.resize( mNumShader );
Property::Index depthProperty = child.GetPropertyIndex(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH);
if(depthProperty == Property::INVALID_INDEX)
{
Property::Index depthProperty = child.GetPropertyIndex(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH);
if(depthProperty == Property::INVALID_INDEX)
{
- depthProperty = child.RegisterProperty(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH, depth);
+ child.RegisterProperty(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH, depth);
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) )
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+ mPropertyDetail( Property::INVALID_INDEX )
Magnifier::Magnifier()
: Control( REQUIRES_TOUCH_EVENTS ),
mPropertySourcePosition(Property::INVALID_INDEX),
Magnifier::Magnifier()
: Control( REQUIRES_TOUCH_EVENTS ),
mPropertySourcePosition(Property::INVALID_INDEX),
+ mDefaultCameraDistance(1000.f),
mActorSize(Vector3::ZERO),
mMagnificationFactor(1.0f)
{
mActorSize(Vector3::ZERO),
mMagnificationFactor(1.0f)
{
Page::Page()
: Control( CONTROL_BEHAVIOUR_NONE ),
mTitle(""),
Page::Page()
: Control( CONTROL_BEHAVIOUR_NONE ),
mTitle(""),
+ mSubTitle(""),
+ mPropertyTitle(Property::INVALID_INDEX),
+ mPropertySubTitle(Property::INVALID_INDEX)
: Control( REQUIRES_TOUCH_EVENTS ),
mPageFactory( pageFactory ),
mPageSize( pageSize ),
: Control( REQUIRES_TOUCH_EVENTS ),
mPageFactory( pageFactory ),
mPageSize( pageSize ),
+ mNeedOffscreenRendering( false ),
mPanning( false ),
mSpineShadowParameter( DEFAULT_SPINE_SHADOW_PARAMETER ),
mCurrentPageIndex( 0 ),
mIndex( 0 ),
mPress( false ),
mPageUpdated( true ),
mPanning( false ),
mSpineShadowParameter( DEFAULT_SPINE_SHADOW_PARAMETER ),
mCurrentPageIndex( 0 ),
mIndex( 0 ),
mPress( false ),
mPageUpdated( true ),
+ mDistanceUpCorner( 0.f ),
+ mDistanceBottomCorner( 0.f ),
+ mPanDisplacement( 0.f ),
+ mConstraints( false ),
mPageTurnStartedSignal(),
mPageTurnFinishedSignal(),
mPagePanStartedSignal(),
mPageTurnStartedSignal(),
mPageTurnFinishedSignal(),
mPagePanStartedSignal(),
: Control( REQUIRES_TOUCH_EVENTS ),
mSelected(false),
mSelectable(true),
: Control( REQUIRES_TOUCH_EVENTS ),
mSelected(false),
mSelectable(true),
}//namespace
PageTurnEffect::PageTurnEffect()
}//namespace
PageTurnEffect::PageTurnEffect()
+: mOriginalCenterPropertyIndex(Property::INVALID_INDEX),
+ mCurrentCenterPropertyIndex(Property::INVALID_INDEX)
{
CubeTransitionCrossEffect::CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize )
{
CubeTransitionCrossEffect::CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize )
-: CubeTransitionEffect( numRows, numColumns, viewAreaSize)
+: CubeTransitionEffect( numRows, numColumns, viewAreaSize),
+ mDisplacementRatio( 1.f )
{
CubeTransitionWaveEffect::CubeTransitionWaveEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize )
{
CubeTransitionWaveEffect::CubeTransitionWaveEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize )
-: CubeTransitionEffect( numRows, numColumns, viewAreaSize)
+: CubeTransitionEffect( numRows, numColumns, viewAreaSize),
+ mSaddleAA( 1.f ),
+ mSaddleBB( 1.f ),
+ mSaddleB( 1.f )
Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
if(propertyActorHittable == Property::INVALID_INDEX && hittable)
{
Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
if(propertyActorHittable == Property::INVALID_INDEX && hittable)
{
- propertyActorHittable = actor.RegisterProperty(ACTOR_HITTABLE, true);
+ actor.RegisterProperty(ACTOR_HITTABLE, true);
}
DissolveLocalEffect::DissolveLocalEffect()
}
DissolveLocalEffect::DissolveLocalEffect()
{
}
//Call the Parent copy constructor to add reference to the implementation for this object
DissolveLocalEffect::DissolveLocalEffect( ShaderEffect handle )
{
}
//Call the Parent copy constructor to add reference to the implementation for this object
DissolveLocalEffect::DissolveLocalEffect( ShaderEffect handle )
-: ShaderEffect( handle )
+: ShaderEffect( handle ),
+ mNumberOfDimples( 1 )