Fix comptime checks in slot map
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone Build is passing
				
			This commit is contained in:
		
							parent
							
								
									455ede6d78
								
							
						
					
					
						commit
						d1c823df41
					
				| @ -641,7 +641,12 @@ pub fn SlotMap(comptime Value: type) type { | |||||||
| 		.signedness = .unsigned, | 		.signedness = .unsigned, | ||||||
| 	}}); | 	}}); | ||||||
| 
 | 
 | ||||||
| 	comptime std.debug.assert(@sizeOf(Index) == @sizeOf(usize)); | 	const Slot = packed struct { | ||||||
|  | 		index: Index, | ||||||
|  | 		is_occupied: bool, | ||||||
|  | 	}; | ||||||
|  | 
 | ||||||
|  | 	comptime std.debug.assert(@sizeOf(Slot) == @sizeOf(usize)); | ||||||
| 
 | 
 | ||||||
| 	return struct { | 	return struct { | ||||||
| 		slots: stack.Sequential(Slot), | 		slots: stack.Sequential(Slot), | ||||||
| @ -655,11 +660,6 @@ pub fn SlotMap(comptime Value: type) type { | |||||||
| 
 | 
 | ||||||
| 		const Self = @This(); | 		const Self = @This(); | ||||||
| 
 | 
 | ||||||
| 		const Slot = packed struct { |  | ||||||
| 			index: Index, |  | ||||||
| 			is_occupied: bool, |  | ||||||
| 		}; |  | ||||||
| 
 |  | ||||||
| 		pub fn deinit(self: *Self) void { | 		pub fn deinit(self: *Self) void { | ||||||
| 			self.slots.deinit(); | 			self.slots.deinit(); | ||||||
| 			self.entries.deinit(); | 			self.entries.deinit(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user