(svn r4360) - CodeChange: add shortcut to SlGetArrayLength of the gamma-function along the lines of the Write/Read functions
authorDarkvater
Tue, 11 Apr 2006 17:03:13 +0000
changeset 3509 5304adc9b471
parent 3508 99974a14a81d
child 3510 26ef8131b359
(svn r4360) - CodeChange: add shortcut to SlGetArrayLength of the gamma-function along the lines of the Write/Read functions
saveload.c
--- a/saveload.c	Tue Apr 11 15:18:22 2006 +0000
+++ b/saveload.c	Tue Apr 11 17:03:13 2006 +0000
@@ -282,6 +282,7 @@
 
 static inline uint SlReadArrayLength(void) {return SlReadSimpleGamma();}
 static inline void SlWriteArrayLength(uint length) {SlWriteSimpleGamma(length);}
+static inline uint SlGetArrayLength(uint length) {return SlGetGammaLength(length);}
 
 void SlSetArrayIndex(uint index)
 {
@@ -351,7 +352,7 @@
 			SlWriteArrayLength(length + 1);
 			break;
 		case CH_SPARSE_ARRAY:
-			SlWriteArrayLength(length + 1 + SlGetGammaLength(_sl.array_index)); // Also include length of sparse index.
+			SlWriteArrayLength(length + 1 + SlGetArrayLength(_sl.array_index)); // Also include length of sparse index.
 			SlWriteSparseIndex(_sl.array_index);
 			break;
 		default: NOT_REACHED();