summaryrefslogtreecommitdiff
path: root/src/other_tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools')
-rw-r--r--src/other_tools/git_operations/git_config_settings.cpp22
-rw-r--r--src/other_tools/ops_maps/critical_git_op_map.cpp2
-rw-r--r--src/other_tools/ops_maps/critical_git_op_map.hpp4
3 files changed, 13 insertions, 15 deletions
diff --git a/src/other_tools/git_operations/git_config_settings.cpp b/src/other_tools/git_operations/git_config_settings.cpp
index b0fe27bc..816e51a7 100644
--- a/src/other_tools/git_operations/git_config_settings.cpp
+++ b/src/other_tools/git_operations/git_config_settings.cpp
@@ -30,18 +30,16 @@ void config_iter_closer(gsl::owner<git_config_iterator*> iter) {
}
// callback to enable SSL certificate check for remote fetch
-const auto certificate_check_cb = [](git_cert* /*cert*/,
- int /*valid*/,
- const char* /*host*/,
- void* /*payload*/) -> int { return 1; };
+const auto kCertificateCheck = [](git_cert* /*cert*/,
+ int /*valid*/,
+ const char* /*host*/,
+ void* /*payload*/) -> int { return 1; };
// callback to remote fetch without an SSL certificate check
-const auto certificate_passthrough_cb = [](git_cert* /*cert*/,
- int /*valid*/,
- const char* /*host*/,
- void* /*payload*/) -> int {
- return 0;
-};
+const auto kCertificatePassthrough = [](git_cert* /*cert*/,
+ int /*valid*/,
+ const char* /*host*/,
+ void* /*payload*/) -> int { return 0; };
/// \brief Custom comparison of matching degrees. Return true if left argument's
/// degree of matching is better that the right argument's. When both are
@@ -187,8 +185,8 @@ auto GitConfigSettings::GetSSLCallback(std::shared_ptr<git_config> const& cfg,
}
}
// set callback: passthrough only if check_cert is false
- return (check_cert and not *check_cert) ? certificate_passthrough_cb
- : certificate_check_cb;
+ return (check_cert and not *check_cert) ? kCertificatePassthrough
+ : kCertificateCheck;
} catch (std::exception const& ex) {
(*logger)(
fmt::format("Getting SSL callback failed with:\n{}", ex.what()),
diff --git a/src/other_tools/ops_maps/critical_git_op_map.cpp b/src/other_tools/ops_maps/critical_git_op_map.cpp
index cbab7c42..b7981db8 100644
--- a/src/other_tools/ops_maps/critical_git_op_map.cpp
+++ b/src/other_tools/ops_maps/critical_git_op_map.cpp
@@ -15,7 +15,7 @@
#include "src/other_tools/ops_maps/critical_git_op_map.hpp"
// define the mapping to actual operations being called
-GitOpKeyMap const GitOpKey::map_ = {
+GitOpKeyMap const GitOpKey::kMap = {
{GitOpType::INITIAL_COMMIT, CriticalGitOps::GitInitialCommit},
{GitOpType::ENSURE_INIT, CriticalGitOps::GitEnsureInit},
{GitOpType::KEEP_TAG, CriticalGitOps::GitKeepTag},
diff --git a/src/other_tools/ops_maps/critical_git_op_map.hpp b/src/other_tools/ops_maps/critical_git_op_map.hpp
index 73ee6a70..5832462a 100644
--- a/src/other_tools/ops_maps/critical_git_op_map.hpp
+++ b/src/other_tools/ops_maps/critical_git_op_map.hpp
@@ -40,7 +40,7 @@ struct GitOpKey {
[[nodiscard]] auto operation(GitOpParams const& params,
AsyncMapConsumerLoggerPtr const& logger) const
-> GitOpValue {
- return map_.at(op_type)(params, logger);
+ return kMap.at(op_type)(params, logger);
}
[[nodiscard]] auto operator==(GitOpKey const& other) const -> bool {
@@ -48,7 +48,7 @@ struct GitOpKey {
}
private:
- static GitOpKeyMap const map_;
+ static GitOpKeyMap const kMap;
};
class CriticalGitOpGuard;