[quake3-commits] r2208 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Dec 8 17:54:45 EST 2011


Author: ztm
Date: 2011-12-08 17:54:45 -0500 (Thu, 08 Dec 2011)
New Revision: 2208

Modified:
   trunk/code/qcommon/common.c
   trunk/code/qcommon/qcommon.h
Log:
Removed unused functoin Hunk_Trash.

Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c	2011-12-08 22:53:58 UTC (rev 2207)
+++ trunk/code/qcommon/common.c	2011-12-08 22:54:45 UTC (rev 2208)
@@ -1877,46 +1877,6 @@
 }
 
 /*
-=================
-Hunk_Trash
-=================
-*/
-void Hunk_Trash( void ) {
-	int length, i, rnd;
-	char *buf, value;
-
-	return;
-
-	if ( s_hunkData == NULL )
-		return;
-
-#ifdef _DEBUG
-	Com_Error(ERR_DROP, "hunk trashed");
-	return;
-#endif
-
-	Cvar_Set("com_jp", "1");
-	Hunk_SwapBanks();
-
-	if ( hunk_permanent == &hunk_low ) {
-		buf = (void *)(s_hunkData + hunk_permanent->permanent);
-	} else {
-		buf = (void *)(s_hunkData + s_hunkTotal - hunk_permanent->permanent );
-	}
-	length = hunk_permanent->permanent;
-
-	if (length > 0x7FFFF) {
-		//randomly trash data within buf
-		rnd = random() * (length - 0x7FFFF);
-		value = 31;
-		for (i = 0; i < 0x7FFFF; i++) {
-			value *= 109;
-			buf[rnd+i] ^= value;
-		}
-	}
-}
-
-/*
 ===================================================================
 
 EVENTS AND JOURNALING

Modified: trunk/code/qcommon/qcommon.h
===================================================================
--- trunk/code/qcommon/qcommon.h	2011-12-08 22:53:58 UTC (rev 2207)
+++ trunk/code/qcommon/qcommon.h	2011-12-08 22:54:45 UTC (rev 2208)
@@ -949,7 +949,6 @@
 void Hunk_FreeTempMemory( void *buf );
 int	Hunk_MemoryRemaining( void );
 void Hunk_Log( void);
-void Hunk_Trash( void );
 
 void Com_TouchMemory( void );
 



More information about the quake3-commits mailing list