summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-26 14:20:16 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-09-26 16:54:16 +0200
commit5baab75fd2ae62b6f6407991922fe234f9e73c88 (patch)
treebc2cb07d625dc6866b0be9a1e347e51467df1703 /test
parent845744929e40dbdc81ed9c7df0152d58bbb28be6 (diff)
downloadjustbuild-5baab75fd2ae62b6f6407991922fe234f9e73c88.tar.gz
Fix redundant std::optional conversions
...proposed by clang-tidy. Enable bugprone-optional-value-conversion check.
Diffstat (limited to 'test')
-rw-r--r--test/buildtool/file_system/git_repo.test.cpp2
-rw-r--r--test/buildtool/file_system/resolve_symlinks_map.test.cpp2
-rw-r--r--test/other_tools/git_operations/critical_git_ops.test.cpp2
-rw-r--r--test/other_tools/git_operations/git_repo_remote.test.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/test/buildtool/file_system/git_repo.test.cpp b/test/buildtool/file_system/git_repo.test.cpp
index 73d37e1d..66293fba 100644
--- a/test/buildtool/file_system/git_repo.test.cpp
+++ b/test/buildtool/file_system/git_repo.test.cpp
@@ -78,7 +78,7 @@ class TestUtils {
: (*repo_path / ".git").string()),
QuoteForShell(repo_path->string()));
if (std::system(cmd.c_str()) == 0) {
- return *repo_path;
+ return repo_path;
}
return std::nullopt;
}
diff --git a/test/buildtool/file_system/resolve_symlinks_map.test.cpp b/test/buildtool/file_system/resolve_symlinks_map.test.cpp
index d1cd7692..01865f6d 100644
--- a/test/buildtool/file_system/resolve_symlinks_map.test.cpp
+++ b/test/buildtool/file_system/resolve_symlinks_map.test.cpp
@@ -103,7 +103,7 @@ auto const kBazId = std::string{"27b32561185c2825150893774953906c6daa6798"};
: (*repo_path / ".git").string()),
QuoteForShell(repo_path->string()));
if (std::system(cmd.c_str()) == 0) {
- return *repo_path;
+ return repo_path;
}
return std::nullopt;
}
diff --git a/test/other_tools/git_operations/critical_git_ops.test.cpp b/test/other_tools/git_operations/critical_git_ops.test.cpp
index c1494bcf..c15842e7 100644
--- a/test/other_tools/git_operations/critical_git_ops.test.cpp
+++ b/test/other_tools/git_operations/critical_git_ops.test.cpp
@@ -80,7 +80,7 @@ class TestUtilsMP {
: (*repo_path / ".git").string()),
QuoteForShell(repo_path->string()));
if (std::system(cmd.c_str()) == 0) {
- return *repo_path;
+ return repo_path;
}
return std::nullopt;
}
diff --git a/test/other_tools/git_operations/git_repo_remote.test.cpp b/test/other_tools/git_operations/git_repo_remote.test.cpp
index f4837b47..a4f0daa6 100644
--- a/test/other_tools/git_operations/git_repo_remote.test.cpp
+++ b/test/other_tools/git_operations/git_repo_remote.test.cpp
@@ -69,7 +69,7 @@ class TestUtils {
: (*repo_path / ".git").string()),
QuoteForShell(repo_path->string()));
if (std::system(cmd.c_str()) == 0) {
- return *repo_path;
+ return repo_path;
}
return std::nullopt;
}