NITCbase / nitcbase.github.io

The entire documentation on implementing the NITCbase project.
https://nitcbase.github.io/
MIT License
10 stars 6 forks source link

Use an enum instead of `char` as Block type argument in BlockBuffer Constructor1 #21

Closed SaintNerevar closed 1 year ago

SaintNerevar commented 2 years ago

Using char type for Block type as argument in Constructor 1 is inconvenient as methods use int form of Block types. Using int as argument in Constructor 1 would collide with the signature for Constructor 2. Instead, we can define an enum like so -

enum BlockType {
    LeafIndex = IND_LEAF,
    InternalIndex = IND_INTERNAL,
    Record = REC
}
jessiyajoy commented 2 years ago

This is part of Constructor 1 issue #33