"Finished" PA06
+- LLDataEngine.c +- PA06_Main +- QueueUtility.c
This commit is contained in:
parent
cc4036d8ad
commit
bc496e01e4
3 changed files with 127 additions and 5 deletions
|
|
@ -66,7 +66,7 @@ bool peekFront( StateDataType *returnVal, const QueueType queue )
|
|||
{
|
||||
// use getListSize to get the 'front' value
|
||||
// use getItemAtIndex to 'see' the value at the front.
|
||||
return getItemAtIndex(returnVal, queue, getListSize(queue) - 1);
|
||||
return getItemAtIndex(returnVal, queue, getListSize(queue));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -85,7 +85,7 @@ bool dequeue( StateDataType *returnVal, QueueType *queue )
|
|||
{
|
||||
// get the "front" of the queue
|
||||
// remove the value in the queue and return success/failure
|
||||
return removeItemAtIndex(queue, returnVal, getListSize(*queue) - 1);
|
||||
return removeItemAtIndex(queue, returnVal, getListSize(*queue));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue