From 69b0a4284aaab0f33a60305c0f0c9fef9907d16c Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 21 Oct 2024 20:29:26 +0200 Subject: [PATCH] refactor: Restructure code to help Clang-Tidy understand it --- src/ccache/context.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ccache/context.cpp b/src/ccache/context.cpp index 0f9fe0ee..62650f98 100644 --- a/src/ccache/context.cpp +++ b/src/ccache/context.cpp @@ -67,8 +67,9 @@ Context::initialize(Args&& compiler_and_args, // initial configuration file. The intention is that all files and directories // in the cache directory should be affected by the configured umask and that // no other files and directories should. - if (config.umask()) { - original_umask = util::set_umask(*config.umask()); + auto mask = config.umask(); + if (mask) { + original_umask = util::set_umask(*mask); } } -- 2.47.2