Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/cpp-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on: # yamllint disable-line rule:truthy
branches: ["main"]
workflow_dispatch:

env:
VCPKG_VERSION: 2026.07.29

jobs:
test:
name: C/C++ CMake CI Test
Expand All @@ -29,9 +32,8 @@ jobs:
- name: Install
shell: bash
run: |
export VCPKG_VERSION=2025.02.14
export VCPKG_VERSION=${VCPKG_VERSION}
git clone \
--depth 1 \
--branch $VCPKG_VERSION \
https://github.com/microsoft/vcpkg.git \
--single-branch \
Expand Down
8 changes: 3 additions & 5 deletions src/lib/exercises/src/hackerrank/warmup/time_conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ std::string timeConversion(const std::string &s) {
time.push_back(segment);
}

std::stringstream hour_str;
hour_str << time[0];

int hour;
hour_str >> hour;
int hour = std::stoi(time[0]);

if (hour < 0 || hour > 23) {
throw std::invalid_argument("Invalid hour value: " + std::to_string(hour));
Expand All @@ -53,6 +49,8 @@ std::string timeConversion(const std::string &s) {
hour += 12;
}

std::stringstream hour_str;

hour_str.str("");
hour_str.clear();

Expand Down
3 changes: 2 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"dependencies": [
"catch2",
"nlohmann-json"
]
],
"builtin-baseline": "dd3097e305afa53f7b4312371f62058d2e665320"
}
Loading