Remove useless swap() code

pull/40/head
Vitaliy Filippov 2015-05-14 01:01:52 +03:00
parent 94efea11dd
commit c0c89c306c
6 changed files with 0 additions and 76 deletions

View File

@ -152,29 +152,6 @@ std::string Entry::CreateLink() const
return m_create_link ;
}
void Entry::Swap( Entry& e )
{
m_title.swap( e.m_title ) ;
m_filename.swap( e.m_filename ) ;
m_kind.swap( e.m_kind ) ;
m_md5.swap( e.m_md5 ) ;
m_etag.swap( e.m_etag ) ;
m_resource_id.swap( e.m_resource_id ) ;
m_parent_hrefs.swap( e.m_parent_hrefs ) ;
m_self_href.swap( e.m_self_href ) ;
m_alt_self.swap( e.m_alt_self ) ;
m_content_src.swap( e.m_content_src ) ;
m_edit_link.swap( e.m_edit_link ) ;
m_create_link.swap( e.m_create_link ) ;
m_mtime.Swap( e.m_mtime ) ;
std::swap( m_change_stamp, e.m_change_stamp ) ;
std::swap( m_is_removed, e.m_is_removed ) ;
}
long Entry::ChangeStamp() const
{
return m_change_stamp ;

View File

@ -71,8 +71,6 @@ public :
const std::vector<std::string>& ParentHrefs() const ;
void Swap( Entry& e ) ;
void Update( const xml::Node& entry ) ;
private :

View File

@ -314,26 +314,6 @@ void Resource::AddChild( Resource *child )
m_child.push_back( child ) ;
}
void Resource::Swap( Resource& coll )
{
m_name.swap( coll.m_name ) ;
m_kind.swap( coll.m_kind ) ;
m_md5.swap( coll.m_md5 ) ;
m_etag.swap( coll.m_etag ) ;
m_id.swap( coll.m_id ) ;
m_href.swap( coll.m_href ) ;
m_content.swap( coll.m_content ) ;
m_edit.swap( coll.m_edit ) ;
m_create.swap( coll.m_create ) ;
m_mtime.Swap( coll.m_mtime ) ;
std::swap( m_parent, coll.m_parent ) ;
m_child.swap( coll.m_child ) ;
std::swap( m_state, coll.m_state ) ;
}
bool Resource::IsFolder() const
{
return m_kind == "folder" ;
@ -669,11 +649,3 @@ bool Resource::HasID() const
}
} } // end of namespace
namespace std
{
void swap( gr::v1::Resource& c1, gr::v1::Resource& c2 )
{
c1.Swap( c2 ) ;
}
}

View File

@ -57,9 +57,6 @@ public :
Resource(const fs::path& root_folder) ;
Resource( const std::string& name, const std::string& kind ) ;
// default copy ctor & op= are fine
void Swap( Resource& coll ) ;
bool IsFolder() const ;
std::string Name() const ;
@ -162,8 +159,3 @@ private :
} ;
} } // end of namespace gr::v1
namespace std
{
void swap( gr::v1::Resource& c1, gr::v1::Resource& c2 ) ;
}

View File

@ -80,18 +80,6 @@ const Resource* ResourceTree::Root() const
return m_root ;
}
void ResourceTree::Swap( ResourceTree& fs )
{
m_set.swap( fs.m_set ) ;
}
ResourceTree& ResourceTree::operator=( const ResourceTree& fs )
{
ResourceTree tmp( fs ) ;
Swap( tmp ) ;
return *this ;
}
Resource* ResourceTree::FindByHref( const std::string& href )
{
// for the resource that not yet have href (e.g. not yet fetched from server)

View File

@ -70,9 +70,6 @@ public :
ResourceTree( const ResourceTree& fs ) ;
~ResourceTree( ) ;
void Swap( ResourceTree& fs ) ;
ResourceTree& operator=( const ResourceTree& fs ) ;
Resource* FindByHref( const std::string& href ) ;
const Resource* FindByHref( const std::string& href ) const ;