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