We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 341c7c3 commit 0420018Copy full SHA for 0420018
2 files changed
cli/main.cpp
@@ -1,4 +1,5 @@
1
#include <iostream>
2
+#include <span>
3
#include <string_view>
4
#include <vector>
5
@@ -8,9 +9,11 @@ int main(int argc, char* argv[])
8
9
{
10
std::vector<std::string_view> args;
11
args.reserve(argc);
- for (int i = 0; i < argc; ++i)
12
+
13
+ const std::span<char*> arguments(argv, argc);
14
+ for (char* arg : arguments)
15
- args.emplace_back(argv[i]);
16
+ args.emplace_back(arg);
17
}
18
19
std::cout << cpuscope::format_message(args) << '\n';
scripts/lint.sh
@@ -9,5 +9,5 @@ fi
find . \
\( -path ./build -o -path ./build-* -o -path ./.git -o -path ./scripts \) -prune \
- -o \( -name "*.cpp" -o -name "*.hpp" \) -print0 \
+ -o \( -name "*.cpp" \) -print0 \
| xargs -0 -n1 clang-tidy -p build
0 commit comments