From: Joel Rosdahl Date: Sun, 14 Feb 2021 19:34:14 +0000 (+0100) Subject: Convert trivial switch statement to if statement X-Git-Tag: v4.2.1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a22503ba572697cca89424cd42e04f6745b28fd;p=thirdparty%2Fccache.git Convert trivial switch statement to if statement --- diff --git a/src/Depfile.cpp b/src/Depfile.cpp index ed491f4dc..13106ce7f 100644 --- a/src/Depfile.cpp +++ b/src/Depfile.cpp @@ -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;