From 4582c6cb76f4fc7f49025969aba7f8a29a797d64 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 13 Sep 2024 10:59:52 +0200 Subject: Fix assignments in conditions ...proposed by clang-tidy. Enable bugprone-assignment-in-if-condition check. --- src/buildtool/file_system/git_context.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/buildtool/file_system/git_context.cpp') diff --git a/src/buildtool/file_system/git_context.cpp b/src/buildtool/file_system/git_context.cpp index 94fb3cef..4fc613a3 100644 --- a/src/buildtool/file_system/git_context.cpp +++ b/src/buildtool/file_system/git_context.cpp @@ -24,7 +24,8 @@ extern "C" { GitContext::GitContext() noexcept { #ifndef BOOTSTRAP_BUILD_TOOL - if (not(initialized_ = (git_libgit2_init() >= 0))) { + initialized_ = git_libgit2_init() >= 0; + if (not initialized_) { Logger::Log(LogLevel::Error, "initializing libgit2 failed"); } #endif -- cgit v1.2.3