Author: aschnell Date: Wed Mar 25 18:50:30 2009 New Revision: 56400 URL: http://svn.opensuse.org/viewcvs/yast?rev=56400&view=rev Log: - make checkBackupState const Modified: trunk/storage/libstorage/src/Storage.cc trunk/storage/libstorage/src/Storage.h trunk/storage/libstorage/src/StorageInterface.h 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 Wed Mar 25 18:50:30 2009 @@ -5602,15 +5602,13 @@ } bool -Storage::checkBackupState( const string& name ) +Storage::checkBackupState( const string& name ) const { bool ret = false; - assertInit(); y2mil("name:" << name); - map<string,CCont>::iterator i = backups.find( name ); - ret = i!=backups.end(); + ret = backups.find(name) != backups.end(); y2mil("ret:" << ret); - return( ret ); + return ret; } struct equal_co 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 Wed Mar 25 18:50:30 2009 @@ -387,7 +387,7 @@ int createBackupState( const string& name ); int removeBackupState( const string& name ); int restoreBackupState( const string& name ); - bool checkBackupState( const string& name ); + bool checkBackupState( const string& name ) const; bool equalBackupStates( const string& lhs, const string& rhs, bool verbose_log ) const; Modified: trunk/storage/libstorage/src/StorageInterface.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageInt... ============================================================================== --- trunk/storage/libstorage/src/StorageInterface.h (original) +++ trunk/storage/libstorage/src/StorageInterface.h Wed Mar 25 18:50:30 2009 @@ -65,7 +65,6 @@ * * #include <y2storage/StorageInterface.h> * - * using namespace std; * using namespace storage; * * int @@ -1942,9 +1941,9 @@ * Checks if a backup with a certain name already exists * * @param name name of the backup to check - * @return boolean if the backup exists + * @return true if the backup exists */ - virtual bool checkBackupState( const string& name ) = 0; + virtual bool checkBackupState(const string& name) const = 0; /** * Compare two backup states @@ -1954,9 +1953,8 @@ * @param verbose_log flag if differences should be logged in detail * @return true if states are equal */ - virtual bool equalBackupStates( const string& lhs, - const string& rhs, - bool verbose_log ) const = 0; + virtual bool equalBackupStates(const string& lhs, const string& rhs, + bool verbose_log) const = 0; /** * Remove existing backup state -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org