mirror of https://github.com/vitalif/grive2
remove unused code
parent
d831b8d59f
commit
e0383a843c
|
@ -111,29 +111,6 @@ const Resource* ResourceTree::FindByHref( const std::string& href ) const
|
|||
return i != map.end() ? *i : 0 ;
|
||||
}
|
||||
|
||||
/// Unlike other search functions, this one does not depend on the multi-index
|
||||
/// container. It traverses the tree instead.
|
||||
Resource* ResourceTree::FindByPath( const fs::path& path )
|
||||
{
|
||||
Resource *current = m_root ;
|
||||
for ( fs::path::iterator i = path.begin() ; i != path.end() && current != 0 ; ++i )
|
||||
{
|
||||
Trace( "path it = %1%", *i ) ;
|
||||
|
||||
// current directory
|
||||
if ( *i == "." )
|
||||
continue ;
|
||||
|
||||
else if ( *i == ".." )
|
||||
current = current->Parent() ;
|
||||
|
||||
else
|
||||
current = current->FindChild( Path2Str(*i) ) ;
|
||||
}
|
||||
|
||||
return current ;
|
||||
}
|
||||
|
||||
/// Reinsert should be called when the ID/HREF were updated
|
||||
bool ResourceTree::ReInsert( Resource *coll )
|
||||
{
|
||||
|
|
|
@ -74,7 +74,6 @@ public :
|
|||
Resource* FindByHref( const std::string& href ) ;
|
||||
const Resource* FindByHref( const std::string& href ) const ;
|
||||
|
||||
Resource* FindByPath( const fs::path& path ) ;
|
||||
Resource* FindByID( const std::string& id ) ;
|
||||
|
||||
bool ReInsert( Resource *coll ) ;
|
||||
|
|
|
@ -213,11 +213,6 @@ Resource* State::FindByHref( const std::string& href )
|
|||
return m_res.FindByHref( href ) ;
|
||||
}
|
||||
|
||||
Resource* State::Find( const fs::path& path )
|
||||
{
|
||||
return m_res.FindByPath( path ) ;
|
||||
}
|
||||
|
||||
State::iterator State::begin()
|
||||
{
|
||||
return m_res.begin() ;
|
||||
|
|
|
@ -55,7 +55,6 @@ public :
|
|||
|
||||
Resource* FindByHref( const std::string& href ) ;
|
||||
Resource* FindByID( const std::string& id ) ;
|
||||
Resource* Find( const fs::path& path ) ;
|
||||
|
||||
void Sync( http::Agent *http, const Json& options ) ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue