[yast-commit] r56653 - in /trunk/storage/libstorage/src: Storage.cc Storage.h
Author: aschnell Date: Mon Apr 6 17:03:51 2009 New Revision: 56653 URL: http://svn.opensuse.org/viewcvs/yast?rev=56653&view=rev Log: - output operator shouldn't modify object Modified: trunk/storage/libstorage/src/Storage.cc trunk/storage/libstorage/src/Storage.h Modified: trunk/storage/libstorage/src/Storage.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=56653&r1=56652&r2=56653&view=diff ============================================================================== --- trunk/storage/libstorage/src/Storage.cc (original) +++ trunk/storage/libstorage/src/Storage.cc Mon Apr 6 17:03:51 2009 @@ -185,8 +185,10 @@ logProcData(); } + void Storage::dumpObjectList() { + assertInit(); ostringstream buf; classic(buf); printInfo(buf); @@ -786,9 +788,8 @@ void -Storage::printInfo(ostream& str) +Storage::printInfo(ostream& str) const { - assertInit(); ConstContPair p = contPair(); for (ConstContIterator i = p.begin(); i != p.end(); ++i) { @@ -5823,7 +5824,7 @@ } -std::ostream& operator<< (std::ostream& s, Storage &v ) +std::ostream& operator<<(std::ostream& s, const Storage& v) { v.printInfo(s); return(s); Modified: trunk/storage/libstorage/src/Storage.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.h?rev=56653&r1=56652&r2=56653&view=diff ============================================================================== --- trunk/storage/libstorage/src/Storage.h (original) +++ trunk/storage/libstorage/src/Storage.h Mon Apr 6 17:03:51 2009 @@ -226,7 +226,7 @@ EtcFstab* getFstab() { return fstab; } void handleLogFile(const string& name) const; static bool testFilesEqual( const string& n1, const string& n2 ); - void printInfo(std::ostream& str); + void printInfo(std::ostream& str) const; void logCo(const Container* c) const; void logProcData(const string& str = "") const; storage::UsedByType usedBy( const string& dev ); @@ -1740,7 +1740,8 @@ static storage::CallbackShowInstallInfo install_info_cb_ycp; static storage::CallbackInfoPopup info_popup_cb_ycp; static storage::CallbackYesNoPopup yesno_popup_cb_ycp; - friend std::ostream& operator<< (std::ostream& s, Storage &v ); + + friend std::ostream& operator<<(std::ostream& s, const Storage& v); map<string, storage::usedBy> danglingUsedBy; -- 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