VEFontCache : Finished porting the LRU
This commit is contained in:
		| @@ -232,9 +232,9 @@ array_grow :: proc( using self : ^Array( $ Type ), min_capacity : u64 ) -> Alloc | ||||
| 	return array_set_capacity( self, new_capacity ) | ||||
| } | ||||
|  | ||||
| array_pop :: proc( using self : Array( $ Type ) ) { | ||||
| 	verify( num != 0, "Attempted to pop an array with no elements" ) | ||||
| 	num -= 1 | ||||
| array_pop :: proc( self : Array( $ Type ) ) { | ||||
| 	verify( self.num != 0, "Attempted to pop an array with no elements" ) | ||||
| 	self.num -= 1 | ||||
| } | ||||
|  | ||||
| array_remove_at :: proc( using self : Array( $ Type ), id : u64 ) | ||||
|   | ||||
| @@ -139,7 +139,7 @@ hmap_chained_reload :: proc( self : HMapChained($Type), allocator : Allocator ) | ||||
| // Entries already found to be vacant will not return true | ||||
| hmap_chained_remove :: proc( self : HMapChained($Type), key : u64 ) -> b32 | ||||
| { | ||||
| 	surface_slot := lookup[hmap_chained_lookup_id(self, key)] | ||||
| 	surface_slot := self.lookup[hmap_chained_lookup_id(self, key)] | ||||
|  | ||||
| 	if surface_slot == nil { | ||||
| 		return false | ||||
| @@ -150,7 +150,7 @@ hmap_chained_remove :: proc( self : HMapChained($Type), key : u64 ) -> b32 | ||||
| 		return true | ||||
| 	} | ||||
|  | ||||
| 	for slot := surface_slot.next; slot != nil; slot.next | ||||
| 	for slot := surface_slot.next; slot != nil; slot = slot.next  | ||||
| 	{ | ||||
| 		if slot.occupied && slot.key == key { | ||||
| 			slot.occupied = false | ||||
|   | ||||
| @@ -32,7 +32,7 @@ import c "core:c/libc" | ||||
| import "core:dynlib" | ||||
|  | ||||
| import "core:hash" | ||||
| 	crc32 :: hash.crc32 | ||||
| 	crc32  :: hash.crc32 | ||||
|  | ||||
| import "core:hash/xxhash" | ||||
| 	xxh32 :: xxhash.XXH32 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user