]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Move variable closer to usage in do_remember_include_file
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 17 Jan 2021 09:27:50 +0000 (10:27 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 17 Jan 2021 11:28:53 +0000 (12:28 +0100)
src/ccache.cpp

index 1b430f851aacf12e7776e089268b0ee4c002a8d4..e8029b458d8365b97d235b22d7b6b9d9611dcbb5 100644 (file)
@@ -314,8 +314,6 @@ do_remember_include_file(Context& ctx,
                          bool system,
                          Hash* depend_mode_hash)
 {
-  bool is_pch = false;
-
   if (path.length() >= 2 && path[0] == '<' && path[path.length() - 1] == '>') {
     // Typically <built-in> or <command-line>.
     return true;
@@ -391,7 +389,7 @@ do_remember_include_file(Context& ctx,
   // Let's hash the include file content.
   Hash fhash;
 
-  is_pch = Util::is_precompiled_header(path);
+  const bool is_pch = Util::is_precompiled_header(path);
   if (is_pch) {
     if (ctx.included_pch_file.empty()) {
       LOG("Detected use of precompiled header: {}", path);