[yast-commit] r56494 - in /trunk/storage/libstorage: examples/TestStorage.cc src/Storage.cc src/Storage.h src/Volume.h

Author: aschnell Date: Tue Mar 31 14:08:33 2009 New Revision: 56494 URL: http://svn.opensuse.org/viewcvs/yast?rev=56494&view=rev Log: - cleanup Modified: trunk/storage/libstorage/examples/TestStorage.cc trunk/storage/libstorage/src/Storage.cc trunk/storage/libstorage/src/Storage.h trunk/storage/libstorage/src/Volume.h Modified: trunk/storage/libstorage/examples/TestStorage.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/examples/TestS... ============================================================================== --- trunk/storage/libstorage/examples/TestStorage.cc (original) +++ trunk/storage/libstorage/examples/TestStorage.cc Tue Mar 31 14:08:33 2009 @@ -8,6 +8,7 @@ using namespace storage; struct test_hdb { bool operator()(const Container&d) const {return( d.name().find( "hdb" )!=string::npos);}}; +struct NotDeleted { bool operator()(const Container& d) const { return !d.deleted(); } }; struct Smaller5 { bool operator()(const Volume&d) const {return(d.nr()<5);}}; struct Smaller150 { bool operator()(const Disk&d) const {return(d.cylinders()<150);}}; struct Larger150 { bool operator()(const Disk&d) const {return(d.cylinders()>150);}}; @@ -67,13 +68,12 @@ } } { - Storage::ContCondIPair<Storage::SkipDeleted>::type p = - Sto.contCondPair<Storage::SkipDeleted>( Storage::SkipDel ); - cout << "SkipDeleted pair empty:" << p.empty() << " length:" << p.length() << endl; - for( Storage::ConstContainerI<Storage::SkipDeleted>::type i=p.begin(); - i!=p.end(); ++i ) + NotDeleted NotDel; + Storage::ContCondIPair<NotDeleted>::type p = Sto.contCondPair<NotDeleted>(NotDel); + cout << "NotDeleted pair empty:" << p.empty() << " length:" << p.length() << endl; + for (Storage::ConstContainerI<NotDeleted>::type i = p.begin(); i != p.end(); ++i) { - cout << *i << endl; + cout << *i << endl; } } struct tmp { Modified: trunk/storage/libstorage/src/Storage.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc... ============================================================================== --- trunk/storage/libstorage/src/Storage.cc (original) +++ trunk/storage/libstorage/src/Storage.cc Tue Mar 31 14:08:33 2009 @@ -5850,8 +5850,6 @@ } -Storage::SkipDeleted Storage::SkipDel; - storage::CallbackProgressBar Storage::progress_bar_cb_ycp; storage::CallbackShowInstallInfo Storage::install_info_cb_ycp; storage::CallbackInfoPopup Storage::info_popup_cb_ycp; Modified: trunk/storage/libstorage/src/Storage.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.h?... ============================================================================== --- trunk/storage/libstorage/src/Storage.h (original) +++ trunk/storage/libstorage/src/Storage.h Tue Mar 31 14:08:33 2009 @@ -201,8 +201,6 @@ }; public: - struct SkipDeleted { bool operator()(const Container&d) const {return( !d.deleted());}}; - static SkipDeleted SkipDel; static bool notDeleted( const Container&d ) { return( !d.deleted() ); }; static bool isDmPart( const Container&d ) { return d.type() == storage::DMRAID || d.type() == storage::DMMULTIPATH; } Modified: trunk/storage/libstorage/src/Volume.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.h?r... ============================================================================== --- trunk/storage/libstorage/src/Volume.h (original) +++ trunk/storage/libstorage/src/Volume.h Tue Mar 31 14:08:33 2009 @@ -176,11 +176,6 @@ void triggerUdevUpdate() const; static bool loopInUse( Storage* sto, const string& loopdev ); - struct SkipDeleted - { - bool operator()(const Volume&d) const { return( !d.deleted());} - }; - static SkipDeleted SkipDel; static bool notDeleted( const Volume&d ) { return( !d.deleted() ); } static bool isDeleted( const Volume&d ) { return( d.deleted() ); } static bool getMajorMinor( const string& device, -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org