]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Convert trivial switch statement to if statement
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 14 Feb 2021 19:34:14 +0000 (20:34 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 14 Feb 2021 19:34:14 +0000 (20:34 +0100)
src/Depfile.cpp

index ed491f4dc17a14d3a9a03f340c8839df1ecb65c2..13106ce7fb576cb7c092ba043de5c3bc5eac0b18 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Joel Rosdahl and other contributors
+// Copyright (C) 2020-2021 Joel Rosdahl and other contributors
 //
 // See doc/AUTHORS.adoc for a complete list of contributors.
 //
@@ -183,12 +183,10 @@ tokenize(nonstd::string_view file_content)
     case '$':
       if (p + 1 < length) {
         const char next = file_content[p + 1];
-        switch (next) {
-        // A dollar sign preceded by a dollar sign escapes the dollar sign.
-        case '$':
+        if (next == '$') {
+          // A dollar sign preceded by a dollar sign escapes the dollar sign.
           c = next;
           ++p;
-          break;
         }
       }
       break;