summaryrefslogtreecommitdiff
path: root/src/other_tools/git_operations/git_config_settings.cpp
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 /src/other_tools/git_operations/git_config_settings.cpp
parent845744929e40dbdc81ed9c7df0152d58bbb28be6 (diff)
downloadjustbuild-5baab75fd2ae62b6f6407991922fe234f9e73c88.tar.gz
Fix redundant std::optional conversions
...proposed by clang-tidy. Enable bugprone-optional-value-conversion check.
Diffstat (limited to 'src/other_tools/git_operations/git_config_settings.cpp')
-rw-r--r--src/other_tools/git_operations/git_config_settings.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/other_tools/git_operations/git_config_settings.cpp b/src/other_tools/git_operations/git_config_settings.cpp
index c820aa32..b0fe27bc 100644
--- a/src/other_tools/git_operations/git_config_settings.cpp
+++ b/src/other_tools/git_operations/git_config_settings.cpp
@@ -327,7 +327,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg,
true /*fatal*/);
return std::nullopt;
}
- return proxy_info.value();
+ return proxy_info;
}
}
// check the generic "http.proxy" gitconfig entry;
@@ -348,7 +348,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg,
true /*fatal*/);
return std::nullopt;
}
- return proxy_info.value();
+ return proxy_info;
}
// cleanup memory
git_buf_dispose(&tmp_buf);
@@ -376,7 +376,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg,
true /*fatal*/);
return std::nullopt;
}
- return proxy_info.value();
+ return proxy_info;
}
// check HTTPS_PROXY envariable
if (const char* envar = std::getenv("HTTPS_PROXY")) {
@@ -390,7 +390,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg,
true /*fatal*/);
return std::nullopt;
}
- return proxy_info.value();
+ return proxy_info;
}
}
else if (url_scheme.value() == "http") {
@@ -406,7 +406,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg,
true /*fatal*/);
return std::nullopt;
}
- return proxy_info.value();
+ return proxy_info;
}
}
// check all_proxy envariable
@@ -421,7 +421,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg,
true /*fatal*/);
return std::nullopt;
}
- return proxy_info.value();
+ return proxy_info;
}
// check ALL_PROXY envariable
if (const char* envar = std::getenv("ALL_PROXY")) {
@@ -435,7 +435,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg,
true /*fatal*/);
return std::nullopt;
}
- return proxy_info.value();
+ return proxy_info;
}
}
}