mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-12 05:58:15 -04:00
Improve circular buffer
This commit is contained in:
parent
109bf6f169
commit
acb7cda4a1
@ -51,6 +51,14 @@ public:
|
||||
start = (start + 1) % Size;
|
||||
return value;
|
||||
}
|
||||
|
||||
void pop_last(){
|
||||
if(end == 0){
|
||||
end = Size - 1;
|
||||
} else {
|
||||
--end;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user