Skip to content

Commit f2899eb

Browse files
committed
Bug Fixes and Performance Improvements
1 parent 1db37e6 commit f2899eb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818

1919
- name: Install C++ tools
2020
run: sudo apt-get update && sudo apt-get install -y clang clang-tidy cppcheck cmake
@@ -45,7 +45,7 @@ jobs:
4545
run: find . -name '*.cpp' | xargs clang-tidy -p build
4646

4747
- name: Upload cppcheck results
48-
uses: actions/upload-artifact@v2
48+
uses: actions/upload-artifact@v3
4949
with:
5050
name: cppcheck-result
5151
path: cppcheck-result.xml

src/Reservation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void Reservation::bookTicket()
7575

7676
while (!busFileStream.eof())
7777
{
78-
if (_strcmpi(b.getSource(), from) == 0 && _strcmpi(b.getDestination(), to) == 0)
78+
if (strcmp(b.getSource(), from) == 0 && strcmp(b.getDestination(), to) == 0)
7979
{
8080
b._displayBusDetails();
8181
chk = 1;
@@ -105,7 +105,7 @@ void Reservation::bookTicket()
105105

106106
while (!busFileStream.eof())
107107
{
108-
if (_strcmpi(b.getSource(), from) == 0 && _strcmpi(b.getDestination(), to) == 0 && strcmp(b.getBusNo(), bNo) == 0)
108+
if (strcmp(b.getSource(), from) == 0 && strcmp(b.getDestination(), to) == 0 && strcmp(b.getBusNo(), bNo) == 0)
109109
{
110110
if (b.getBookedSeats() >= 32)
111111
{
@@ -503,7 +503,7 @@ void Reservation::viewReservationsBySource()
503503

504504
while (!ticketFileStream.eof())
505505
{
506-
if (_strcmpi(bus.getSource(), s) == 0)
506+
if (strcmp(bus.getSource(), s) == 0)
507507
{
508508
_displayReservationDetails();
509509
chk = 1;
@@ -550,7 +550,7 @@ void Reservation::viewReservationsByDestination()
550550

551551
while (!ticketFileStream.eof())
552552
{
553-
if (_strcmpi(bus.getDestination(), d) == 0)
553+
if (strcmp(bus.getDestination(), d) == 0)
554554
{
555555
_displayReservationDetails();
556556
chk = 1;

0 commit comments

Comments
 (0)