Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libcmis/atom-document.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void AtomDocument::cancelCheckout( )

// Use working-copy link if provided as a workaround
// for some non-compliant repositories
AtomLink* link = getLink( "working-copy", "application/atom+xml;type=entry" );
const AtomLink* link = getLink( "working-copy", "application/atom+xml;type=entry" );
if ( link )
url = link->getHref( );

Expand Down Expand Up @@ -394,7 +394,7 @@ vector< libcmis::DocumentPtr > AtomDocument::getAllVersions( )
throw libcmis::Exception( string( "GetAllVersions not allowed on node " ) + getId() );

vector< libcmis::DocumentPtr > versions;
AtomLink* link = getLink( "version-history", string( ) );
const AtomLink* link = getLink( "version-history", string( ) );
if ( link != NULL )
{
string pageUrl = link->getHref( );
Expand Down
4 changes: 2 additions & 2 deletions src/libcmis/atom-folder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ AtomFolder::~AtomFolder( )

vector< libcmis::ObjectPtr > AtomFolder::getChildren( )
{
AtomLink* childrenLink = getLink( "down", "application/atom+xml;type=feed" );
const AtomLink* childrenLink = getLink( "down", "application/atom+xml;type=feed" );

// Some servers aren't giving the GetChildren properly... if not defined, we need to try
// as we may have the right to proceed.
Expand Down Expand Up @@ -263,7 +263,7 @@ libcmis::DocumentPtr AtomFolder::createDocument( const PropertyPtrMap& propertie
vector< string > AtomFolder::removeTree( bool allVersions, libcmis::UnfileObjects::Type unfile,
bool continueOnError )
{
AtomLink* treeLink = getLink( "down", "application/cmistree+xml" );
const AtomLink* treeLink = getLink( "down", "application/cmistree+xml" );
if ( NULL == treeLink )
treeLink = getLink( "http://docs.oasis-open.org/ns/cmis/link/200908/foldertree", "application/cmistree+xml" );

Expand Down
4 changes: 2 additions & 2 deletions src/libcmis/atom-object.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void AtomObject::move( boost::shared_ptr< libcmis::Folder > source, boost::share
if ( NULL == atomDestination )
throw libcmis::Exception( string( "Destination is not an AtomFolder" ) );

AtomLink* destChildrenLink = atomDestination->getLink( "down", "application/atom+xml;type=feed" );
const AtomLink* destChildrenLink = atomDestination->getLink( "down", "application/atom+xml;type=feed" );

if ( ( NULL == destChildrenLink ) || ( getAllowableActions().get() &&
!getAllowableActions()->isAllowed( libcmis::ObjectAction::MoveObject ) ) )
Expand Down Expand Up @@ -311,7 +311,7 @@ void AtomObject::move( boost::shared_ptr< libcmis::Folder > source, boost::share

string AtomObject::getInfosUrl( )
{
AtomLink* selfLink = getLink( "self", "application/atom+xml;type=entry" );
const AtomLink* selfLink = getLink( "self", "application/atom+xml;type=entry" );
if ( NULL != selfLink )
return selfLink->getHref( );
return string( );
Expand Down
2 changes: 1 addition & 1 deletion src/libcmis/ws-object-type.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ WSObjectType& WSObjectType::operator=( const WSObjectType& copy )
void WSObjectType::refresh( )
{
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

if ( other != NULL )
*this = *other;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcmis/ws-object.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ libcmis::ObjectPtr WSObject::updateProperties(
void WSObject::refresh( )
{
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

if ( other != NULL )
*this = *other;
}
Expand Down