]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor: Rename local variable in macro to avoid clashes
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 2 Aug 2025 16:40:42 +0000 (18:40 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 3 Aug 2025 11:45:19 +0000 (13:45 +0200)
src/ccache/util/expected.hpp

index bb23c5ffc6ce54b1aa2abd495ecb8225349b6984..a99cd2a3b30bdb6bdfc47bce74f279d5cb923052 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2025 Joel Rosdahl and other contributors
 //
 // See doc/AUTHORS.adoc for a complete list of contributors.
 //
@@ -52,9 +52,9 @@ void throw_on_error(const T& value, std::string_view prefix);
 
 #define TRY(x_)                                                                \
   do {                                                                         \
-    const auto result = x_;                                                    \
-    if (!result) {                                                             \
-      return tl::unexpected(result.error());                                   \
+    const auto result_ = x_;                                                   \
+    if (!result_) {                                                            \
+      return tl::unexpected(result_.error());                                  \
     }                                                                          \
   } while (false)