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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Sep 7 00:09:34 CEST 2008


Revision: 34397
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34397&view=rev
Author:   lordhoto
Date:     2008-09-06 22:09:34 +0000 (Sat, 06 Sep 2008)

Log Message:
-----------
Added hasArchive to SearchSet.

Modified Paths:
--------------
    scummvm/trunk/common/archive.cpp
    scummvm/trunk/common/archive.h

Modified: scummvm/trunk/common/archive.cpp
===================================================================
--- scummvm/trunk/common/archive.cpp	2008-09-06 21:23:08 UTC (rev 34396)
+++ scummvm/trunk/common/archive.cpp	2008-09-06 22:09:34 UTC (rev 34397)
@@ -225,6 +225,10 @@
 	}
 }
 
+bool SearchSet::hasArchive(const String &name) const {
+	return (find(name) != _list.end());
+}
+
 void SearchSet::clear() {
 	_list.clear();
 }

Modified: scummvm/trunk/common/archive.h
===================================================================
--- scummvm/trunk/common/archive.h	2008-09-06 21:23:08 UTC (rev 34396)
+++ scummvm/trunk/common/archive.h	2008-09-06 22:09:34 UTC (rev 34397)
@@ -165,16 +165,21 @@
 
 public:
 	/**
-	 * Add a new Archive to the searchable set.
+	 * Add a new archive to the searchable set.
 	 */
 	void add(const String& name, ArchivePtr archive, uint priority = 0);
 
 	/**
-	 * Remove an Archive from the searchable set.
+	 * Remove an archive from the searchable set.
 	 */
 	void remove(const String& name);
 
 	/**
+	 * Check if a given archive name is already present.
+	 */
+	bool hasArchive(const String &name) const;
+
+	/**
      * Empties the searchable set.
      */
 	void clear();


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