Skip to content

Conversation

@serval2412
Copy link
Contributor

src/libcmis/atom-document.cxx:303:15: style: Variable 'link' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-document.cxx:397:15: style: Variable 'link' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-folder.cxx:63:15: style: Variable 'childrenLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-folder.cxx:266:15: style: Variable 'treeLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-object.cxx:260:15: style: Variable 'destChildrenLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-object.cxx:314:15: style: Variable 'selfLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/ws-object-type.cxx:69:25: style: Variable 'other' can be declared as pointer to const [constVariablePointer]
src/libcmis/ws-object.cxx:108:21: style: Variable 'other' can be declared as pointer to const [constVariablePointer]

src/libcmis/atom-document.cxx:303:15: style: Variable 'link' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-document.cxx:397:15: style: Variable 'link' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-folder.cxx:63:15: style: Variable 'childrenLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-folder.cxx:266:15: style: Variable 'treeLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-object.cxx:260:15: style: Variable 'destChildrenLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/atom-object.cxx:314:15: style: Variable 'selfLink' can be declared as pointer to const [constVariablePointer]
src/libcmis/ws-object-type.cxx:69:25: style: Variable 'other' can be declared as pointer to const [constVariablePointer]
src/libcmis/ws-object.cxx:108:21: style: Variable 'other' can be declared as pointer to const [constVariablePointer]
@caolanm caolanm merged commit 17d1b3c into tdf:master Mar 3, 2024
@serval2412 serval2412 deleted the cppcheck_constVariablePointer branch March 3, 2024 20:02
{
libcmis::ObjectTypePtr type = m_session->getType( m_id );
WSObjectType* const other = dynamic_cast< WSObjectType* >( type.get( ) );
const WSObjectType* const other = dynamic_cast< WSObjectType* >( type.get( ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type in the dynamic_cast should be updated too. (Even better: change just the type in the cast and use const auto for the variable decl.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch submitted here:
#65

{
libcmis::ObjectPtr object = m_session->getObject( getId( ) );
WSObject* const other = dynamic_cast< WSObject* >( object.get( ) );
const WSObject* const other = dynamic_cast< WSObject* >( object.get( ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants