Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data buffer #18

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Renamed function to Dequeue()
pranavboyapati committed Dec 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a714c415e68113a58a60edf0db65685cf4861f51
2 changes: 1 addition & 1 deletion data_buffer.h
pranavboyapati marked this conversation as resolved.
Show resolved Hide resolved
pranavboyapati marked this conversation as resolved.
Show resolved Hide resolved
pranavboyapati marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ void AddElementToBuffer(struct Buffer b, int dataPoint)

//this function returns the first data point in the buffer and then removes it from the buffer, assuming the buffer is not empty
//returns the max value for int if the buffer is empty as an error indicator
int GetFirstFromBuffer(struct Buffer b)
int Dequeue(struct Buffer b)
{
if (b.elementsInQueue > 0)
{