Skip to content

Commit

Permalink
Bug Fixes and Performance Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nixrajput committed Jul 23, 2024
1 parent 1db37e6 commit f2899eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions src/Reservation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f2899eb

Please sign in to comment.