[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 754
Date       : Sat Apr  1 16:30:00 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/gcache.cpp
   M /Trunk/XaraLX/Kernel/gcache.h
   M /Trunk/XaraLX/Kernel/nodetext.cpp

Fixed gcache to be a bit more 64 bit friendly
Fixed a warning in nodetext.cpp


Diff:
Index: Trunk/XaraLX/Kernel/gcache.cpp
===================================================================
--- Trunk/XaraLX/Kernel/gcache.cpp	(revision 753)
+++ Trunk/XaraLX/Kernel/gcache.cpp	(revision 754)
@@ -142,7 +142,7 @@
 	CacheStart->Next		= CacheEnd->Prev		=
 	CacheStart->NextFree 	= CacheEnd->PrevFree	= FreeBlock ;
 	CacheStart->PrevFree 	= CacheEnd->NextFree	= NULL ;
-	CacheStart->State		= CacheEnd->State		= NULL ;
+	CacheStart->State		= CacheEnd->State		= 0 ;
 	FreeBlock->Prev			= FreeBlock->PrevFree	= CacheStart ;
 	FreeBlock->Next			= FreeBlock->NextFree	= CacheEnd ;
 	FreeBlock->State		= FREE ;
Index: Trunk/XaraLX/Kernel/nodetext.cpp
===================================================================
--- Trunk/XaraLX/Kernel/nodetext.cpp	(revision 753)
+++ Trunk/XaraLX/Kernel/nodetext.cpp	(revision 754)
@@ -2265,7 +2265,7 @@
 	PORTNOTETRACE("text","TextChar::Snap - do nothing");
 #if !defined(EXCLUDE_FROM_RALPH)
 	MILLIPOINT SnapDist    = CSnap::GetSnapDist();
-	MILLIPOINT SqrSnapDist = SnapDist*SnapDist;
+//	MILLIPOINT SqrSnapDist = SnapDist*SnapDist;
 
 	// create a format region with an attribute stack
 	FormatRegion FRegion;
Index: Trunk/XaraLX/Kernel/gcache.h
===================================================================
--- Trunk/XaraLX/Kernel/gcache.h	(revision 753)
+++ Trunk/XaraLX/Kernel/gcache.h	(revision 754)
@@ -122,8 +122,10 @@
 	} ;
 } ;
 
-const size_t FreeCacheBlockSize = 20 ;
-const size_t UsedCacheBlockSize = 24 ;
+// For some reason the size of Object[] is not included in the latter calc, presumably because
+// it's not really of size[1] - AMB
+const size_t FreeCacheBlockSize = 4 * sizeof(CacheBlock *) + sizeof (UINT32) ;
+const size_t UsedCacheBlockSize = 5 * sizeof(CacheBlock *) + sizeof (UINT32) ;
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
 


Xara