diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ba1c8cb..654a80e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install C++ tools run: sudo apt-get update && sudo apt-get install -y clang clang-tidy cppcheck cmake @@ -45,7 +45,7 @@ jobs: run: find . -name '*.cpp' | xargs clang-tidy -p build - name: Upload cppcheck results - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: cppcheck-result path: cppcheck-result.xml diff --git a/src/Reservation.cpp b/src/Reservation.cpp index 9985f4b..161d766 100644 --- a/src/Reservation.cpp +++ b/src/Reservation.cpp @@ -75,7 +75,7 @@ void Reservation::bookTicket() while (!busFileStream.eof()) { - if (_strcmpi(b.getSource(), from) == 0 && _strcmpi(b.getDestination(), to) == 0) + if (strcmp(b.getSource(), from) == 0 && strcmp(b.getDestination(), to) == 0) { b._displayBusDetails(); chk = 1; @@ -105,7 +105,7 @@ void Reservation::bookTicket() while (!busFileStream.eof()) { - if (_strcmpi(b.getSource(), from) == 0 && _strcmpi(b.getDestination(), to) == 0 && strcmp(b.getBusNo(), bNo) == 0) + if (strcmp(b.getSource(), from) == 0 && strcmp(b.getDestination(), to) == 0 && strcmp(b.getBusNo(), bNo) == 0) { if (b.getBookedSeats() >= 32) { @@ -503,7 +503,7 @@ void Reservation::viewReservationsBySource() while (!ticketFileStream.eof()) { - if (_strcmpi(bus.getSource(), s) == 0) + if (strcmp(bus.getSource(), s) == 0) { _displayReservationDetails(); chk = 1; @@ -550,7 +550,7 @@ void Reservation::viewReservationsByDestination() while (!ticketFileStream.eof()) { - if (_strcmpi(bus.getDestination(), d) == 0) + if (strcmp(bus.getDestination(), d) == 0) { _displayReservationDetails(); chk = 1;