[Scummvm-cvs-logs] CVS: scummvm/saga list.h,1.4,1.5

Eugene Sandulenko sev at users.sourceforge.net
Thu Dec 16 13:35:00 CET 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12918

Modified Files:
	list.h 
Log Message:
Proper fix for line endings.


Index: list.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/list.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- list.h	16 Dec 2004 21:30:06 -0000	1.4
+++ list.h	16 Dec 2004 21:33:58 -0000	1.5
@@ -19,16 +19,23 @@
  *
  */
 
-#ifndef SAGA_LIST_H__
#define SAGA_LIST_H__

+#ifndef SAGA_LIST_H__
+#define SAGA_LIST_H__
+
 #include "common/list.h"
-
namespace Saga {

+
+namespace Saga {
 
 template <class T>
 class SortedList : public Common::List<T> {
-public:
	typedef int ( CompareFunction ) (const T& , const T&);

+public:
+	typedef int ( CompareFunction ) (const T& , const T&);
+
 	typedef typename Common::List<T>::iterator        iterator;
 	typedef typename Common::List<T>::const_iterator  const_iterator;
-	
public:

+	
+public:
+
 	iterator pushFront(const T& element) {
 		return insert(Common::List<T>::begin(), element);
 	}
@@ -68,7 +75,9 @@
 
 		for (iterator i = Common::List<T>::begin(); i != Common::List<T>::end(); ++i) {
 			res = compareFunction(element, i.operator*());
-			if	(res < 0) {
				return insert(i, element);
			}
+			if	(res < 0) {
+				return insert(i, element);
+			}
 		}
 		return pushBack(element);
 	}
@@ -80,8 +89,12 @@
 		--i;		
 		while (i != Common::List<T>::end()) {
 			res = compareFunction(i.operator*(), pos.operator*());
-			if (res <= 0) {

-				T temp(*pos);
				erase(pos);
				++i;				
				return insert(i, temp);
+			if (res <= 0) {
+
+				T temp(*pos);
+				erase(pos);
+				++i;				
+				return insert(i, temp);
 			}
 			--i;
 		}
@@ -95,8 +108,11 @@
 		++i;
 		while (i != Common::List<T>::end()) {
 			res = compareFunction(i.operator*(), pos.operator*());
-			if (res >= 0) {

-				T temp(*pos);
				erase(pos);
				return insert(i, temp);
+			if (res >= 0) {
+
+				T temp(*pos);
+				erase(pos);
+				return insert(i, temp);
 			}
 			++i;
 		}
@@ -131,5 +147,8 @@
 
 		return false;
 	}
-};

-} // End of namespace Saga
#endif
\ No newline at end of file
+};
+
+} // End of namespace Saga
+
+#endif





More information about the Scummvm-git-logs mailing list