Fixed input event buffer issues
Queue doesn't properly act as a ring buffer had to roll my own. I want to make a allocated ring buffer as well...
This commit is contained in:
@ -186,15 +186,15 @@ array_back :: proc( self : Array($Type) ) -> Type {
|
||||
return value
|
||||
}
|
||||
|
||||
// array_push_back :: proc( using self : Array( $ Type)) -> b32 {
|
||||
// if num == capacity {
|
||||
// return false
|
||||
// }
|
||||
array_push_back :: proc( using self : Array( $ Type)) -> b32 {
|
||||
if num == capacity {
|
||||
return false
|
||||
}
|
||||
|
||||
// data[ num ] = value
|
||||
// num += 1
|
||||
// return true
|
||||
// }
|
||||
data[ num ] = value
|
||||
num += 1
|
||||
return true
|
||||
}
|
||||
|
||||
array_clear :: proc "contextless" ( using self : Array( $ Type ), zero_data : b32 = false ) {
|
||||
if zero_data {
|
||||
|
Reference in New Issue
Block a user