(svn r13360) -Fix (r13359): Forgot to remove some instances of FiosAlloc()
authorskidd13
Mon, 02 Jun 2008 14:27:58 +0000
changeset 9442 d1c57fd30012
parent 9441 6f3d3595b42c
child 9443 e22cf32235dd
(svn r13360) -Fix (r13359): Forgot to remove some instances of FiosAlloc()
src/fios.h
src/os2.cpp
src/win32.cpp
--- a/src/fios.h	Mon Jun 02 14:19:27 2008 +0000
+++ b/src/fios.h	Mon Jun 02 14:27:58 2008 +0000
@@ -105,8 +105,6 @@
 bool FiosDelete(const char *name);
 /* Make a filename from a name */
 void FiosMakeSavegameName(char *buf, const char *name, size_t size);
-/* Allocate a new FiosItem */
-FiosItem *FiosAlloc();
 
 int CDECL compare_FiosItems(const void *a, const void *b);
 
--- a/src/os2.cpp	Mon Jun 02 14:19:27 2008 +0000
+++ b/src/os2.cpp	Mon Jun 02 14:27:58 2008 +0000
@@ -67,7 +67,7 @@
 #endif
 
 		if (disk == disk2) {
-			FiosItem *fios = FiosAlloc();
+			FiosItem *fios = _fios_items.Append()();
 			fios->type = FIOS_TYPE_DRIVE;
 			fios->mtime = 0;
 #ifndef __INNOTEK_LIBC__
--- a/src/win32.cpp	Mon Jun 02 14:19:27 2008 +0000
+++ b/src/win32.cpp	Mon Jun 02 14:27:58 2008 +0000
@@ -780,7 +780,7 @@
 {
 #if defined(WINCE)
 	/* WinCE only knows one drive: / */
-	FiosItem *fios = FiosAlloc();
+	FiosItem *fios = _fios_items.Append()();
 	fios->type = FIOS_TYPE_DRIVE;
 	fios->mtime = 0;
 	snprintf(fios->name, lengthof(fios->name), PATHSEP "");
@@ -791,7 +791,7 @@
 
 	GetLogicalDriveStrings(sizeof(drives), drives);
 	for (s = drives; *s != '\0';) {
-		FiosItem *fios = FiosAlloc();
+		FiosItem *fios = _fios_items.Append()();
 		fios->type = FIOS_TYPE_DRIVE;
 		fios->mtime = 0;
 		snprintf(fios->name, lengthof(fios->name),  "%c:", s[0] & 0xFF);