project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Roomlist.java
changeset 10017 de822cd3df3a
parent 7584 7831c84cc644
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Roomlist.java	Tue Jan 21 22:38:13 2014 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/netplay/Roomlist.java	Tue Jan 21 22:43:06 2014 +0100
@@ -27,32 +27,32 @@
 import org.hedgewars.hedgeroid.util.ObservableTreeMap;
 
 public class Roomlist extends ObservableTreeMap<String, RoomWithId> {
-	private long nextId = 1;
-	
-	public void updateList(Room[] newRooms) {
-		Map<String, RoomWithId> newMap = new TreeMap<String, RoomWithId>();
-		for(Room room : newRooms) {
-			RoomWithId oldEntry = get(room.name);
-			if(oldEntry == null) {
-				newMap.put(room.name, new RoomWithId(room, nextId++));
-			} else {
-				newMap.put(room.name, new RoomWithId(room, oldEntry.id));
-			}
-		}
-		replaceContent(newMap);
-	}
-	
-	public void addRoomWithNewId(Room room) {
-		put(room.name, new RoomWithId(room, nextId++));
-	}
-	
-	public void updateRoom(String name, Room room) {
-		RoomWithId oldEntry = get(name);
-		if(oldEntry == null) {
-			addRoomWithNewId(room);
-		} else {
-			remove(name);
-			put(room.name, new RoomWithId(room, oldEntry.id));
-		}
-	}
+    private long nextId = 1;
+
+    public void updateList(Room[] newRooms) {
+        Map<String, RoomWithId> newMap = new TreeMap<String, RoomWithId>();
+        for(Room room : newRooms) {
+            RoomWithId oldEntry = get(room.name);
+            if(oldEntry == null) {
+                newMap.put(room.name, new RoomWithId(room, nextId++));
+            } else {
+                newMap.put(room.name, new RoomWithId(room, oldEntry.id));
+            }
+        }
+        replaceContent(newMap);
+    }
+
+    public void addRoomWithNewId(Room room) {
+        put(room.name, new RoomWithId(room, nextId++));
+    }
+
+    public void updateRoom(String name, Room room) {
+        RoomWithId oldEntry = get(name);
+        if(oldEntry == null) {
+            addRoomWithNewId(room);
+        } else {
+            remove(name);
+            put(room.name, new RoomWithId(room, oldEntry.id));
+        }
+    }
 }