[Scummvm-cvs-logs] SF.net SVN: scummvm:[42911] scummvm/trunk/common

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Jul 29 23:39:16 CEST 2009


Revision: 42911
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42911&view=rev
Author:   fingolfin
Date:     2009-07-29 21:39:16 +0000 (Wed, 29 Jul 2009)

Log Message:
-----------
Removed redundant File::ioFailed() implementation; also turned ReadStream::ioFailed from a virtual into an inline method

Modified Paths:
--------------
    scummvm/trunk/common/file.cpp
    scummvm/trunk/common/file.h
    scummvm/trunk/common/stream.h

Modified: scummvm/trunk/common/file.cpp
===================================================================
--- scummvm/trunk/common/file.cpp	2009-07-29 21:39:00 UTC (rev 42910)
+++ scummvm/trunk/common/file.cpp	2009-07-29 21:39:16 UTC (rev 42911)
@@ -120,10 +120,6 @@
 	return _handle != NULL;
 }
 
-bool File::ioFailed() const {
-	return !_handle || (eos() || err());
-}
-
 bool File::err() const {
 	assert(_handle);
 	return _handle->err();

Modified: scummvm/trunk/common/file.h
===================================================================
--- scummvm/trunk/common/file.h	2009-07-29 21:39:00 UTC (rev 42910)
+++ scummvm/trunk/common/file.h	2009-07-29 21:39:16 UTC (rev 42911)
@@ -126,13 +126,6 @@
 	 */
 	const char *getName() const { return _name.c_str(); }
 
-	/**
-	 * DEPRECATED: Use err() or eos() instead.
-	 * Returns true if any I/O failure occurred or the end of the
-	 * stream was reached while reading.
-	 */
-	bool ioFailed() const;
-
 	bool err() const;	// implement abstract Stream method
 	void clearErr();	// implement abstract Stream method
 	bool eos() const;	// implement abstract SeekableReadStream method

Modified: scummvm/trunk/common/stream.h
===================================================================
--- scummvm/trunk/common/stream.h	2009-07-29 21:39:00 UTC (rev 42910)
+++ scummvm/trunk/common/stream.h	2009-07-29 21:39:16 UTC (rev 42911)
@@ -179,7 +179,7 @@
 	 * DEPRECATED
 	 * Default implementation for backward compatibility
 	 */
-	virtual bool ioFailed() { return (eos() || err()); }
+	inline bool ioFailed() { return (eos() || err()); }
 
 	/**
 	 * Read an unsigned byte from the stream and return it.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list