Amend code review comments
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kayomn 2023-06-03 20:05:47 +00:00
parent 713f9bb08c
commit d8077d782d
1 changed files with 6 additions and 5 deletions

View File

@ -7,11 +7,11 @@ const math = @import("./math.zig");
const std = @import("std"); const std = @import("std");
/// ///
/// Addressable mapping of integer values of type described by `index_int` to values of type `Value`. /// Addressable mapping of integers described by `index_int` to values of type `Value`.
/// ///
/// Slab maps are similar to slot maps in that they have O(1) insertion and removal, use a fragmented flat table /// Slab maps are similar to slot maps in that they have O(1) insertion and removal, however, use a flat table layout
/// structure instead. This reduces memory usage in some cases and can be useful for data that does not need to be /// instead of parallel arrays. This reduces memory usage in some cases and can be useful for data that does not need to
/// quickly iterated over, as values ordering is not guaranteed. /// be quickly iterated over, as values ordering is not guaranteed.
/// ///
/// *Note* `index_int` values may be as big or as small as desired per the use-case of the consumer, however, integers /// *Note* `index_int` values may be as big or as small as desired per the use-case of the consumer, however, integers
/// smaller than `usize` may result in the map reporting it is out of memory due to exhausting the addressable space /// smaller than `usize` may result in the map reporting it is out of memory due to exhausting the addressable space
@ -37,7 +37,7 @@ pub fn Map(comptime index_int: std.builtin.Type.Int, comptime Value: type) type
const Index = math.Int(index_int); const Index = math.Int(index_int);
/// ///
/// Slab type. /// Slab map type.
/// ///
const Self = @This(); const Self = @This();
@ -78,6 +78,7 @@ pub fn Map(comptime index_int: std.builtin.Type.Int, comptime Value: type) type
self.table = &.{}; self.table = &.{};
self.count = 0; self.count = 0;
self.free_index = 0;
} }
/// ///