From b3f0b75a08106a107f49f259451e2940fd1bfa9b Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Sat, 6 Jun 2020 13:02:36 -0400 Subject: [PATCH] remove semicolons after functions in a class Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com> --- data_structures/queue.h | 16 ++++++++-------- data_structures/stack.h | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/data_structures/queue.h b/data_structures/queue.h index ed97a1e8d..dd53da7d0 100644 --- a/data_structures/queue.h +++ b/data_structures/queue.h @@ -26,20 +26,20 @@ class queue { } std::cout << std::endl; std::cout << "Size of queue: " << size << std::endl; - }; + } /** Default constructor*/ queue() { queueFront = NULL; queueRear = NULL; size = 0; - }; + } /** Destructor */ - ~queue(){}; + ~queue() {} /** Determine whether the queue is empty */ - bool isEmptyQueue() { return (queueFront == NULL); }; + bool isEmptyQueue() { return (queueFront == NULL); } /** Add new item to the queue */ void enQueue(Kind item) { @@ -55,13 +55,13 @@ class queue { queueRear = queueRear->next; } size++; - }; + } /** Return the first element of the queue */ Kind front() { assert(queueFront != NULL); return queueFront->data; - }; + } /** Remove the top element of the queue */ void deQueue() { @@ -74,10 +74,10 @@ class queue { } else { std::cout << "Queue is empty !" << std::endl; } - }; + } /** Clear queue */ - void clear() { queueFront = NULL; }; + void clear() { queueFront = NULL; } private: node *queueFront; /**< Pointer to the front of the queue */ diff --git a/data_structures/stack.h b/data_structures/stack.h index 7b50e1f67..8278a3d00 100644 --- a/data_structures/stack.h +++ b/data_structures/stack.h @@ -26,16 +26,16 @@ class stack { } std::cout << std::endl; std::cout << "Size of stack: " << size << std::endl; - }; + } /** Default constructor*/ stack() { stackTop = NULL; size = 0; - }; + } /** Destructor */ - ~stack(){}; + ~stack() {} /** Determine whether the stack is empty */ bool isEmptyStack() { return (stackTop == NULL); }; @@ -48,13 +48,13 @@ class stack { newNode->next = stackTop; stackTop = newNode; size++; - }; + } /** Return the top element of the stack */ Type top() { assert(stackTop != NULL); return stackTop->data; - }; + } /** Remove the top element of the stack */ void pop() { @@ -67,10 +67,10 @@ class stack { } else { std::cout << "Stack is empty !" << std::endl; } - }; + } /** Clear stack */ - void clear() { stackTop = NULL; }; + void clear() { stackTop = NULL; } /** Overload "=" the assignment operator */ stack &operator=(const stack &otherStack) { @@ -101,7 +101,7 @@ class stack { } size = otherStack.size; return *this; - }; + } private: node *stackTop; /**< Pointer to the stack */