Author: jreidinger Date: Fri Jun 20 16:22:42 2008 New Revision: 10434 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10434&view=rev Log: change getService method to provide copy and not const reference Modified: trunk/libzypp/zypp/RepoManager.cc trunk/libzypp/zypp/RepoManager.h Modified: trunk/libzypp/zypp/RepoManager.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=10434&r1=10433&r2=10434&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.cc (original) +++ trunk/libzypp/zypp/RepoManager.cc Fri Jun 20 16:22:42 2008 @@ -1416,11 +1416,8 @@ MIL << "done" << endl; } - const Service& RepoManager::getService( const std::string& name ) const + Service RepoManager::getService( const std::string& name ) const { - //little trick for Set, because it is sorted by Service name - Service tmpServ(name); - ServiceConstIterator it = _pimpl->services.find(name); if ( it == serviceEnd() ) return Service::noService; Modified: trunk/libzypp/zypp/RepoManager.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.h?rev=10434&r1=10433&r2=10434&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.h (original) +++ trunk/libzypp/zypp/RepoManager.h Fri Jun 20 16:22:42 2008 @@ -457,7 +457,7 @@ ServiceConstIterator serviceEnd() const; - const Service& getService( const std::string& name ) const; + Service getService( const std::string& name ) const; void refreshServices(); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org