]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make clang-format comments stable across clang-format versions
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 10 Feb 2020 20:16:31 +0000 (21:16 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 10 Feb 2020 20:16:31 +0000 (21:16 +0100)
Now at least clang-format 6, 7, 8 and 9 format all code the same.

src/CacheEntryWriter.cpp

index a71a73149f0a5de277fdcb7dac9618012fe1435d..6636bf556027120398c32c230415b84ecba9cd5b 100644 (file)
@@ -24,12 +24,12 @@ CacheEntryWriter::CacheEntryWriter(FILE* stream,
                                    Compression::Type compression_type,
                                    int8_t compression_level,
                                    uint64_t payload_size)
+  // clang-format off
   : m_compressor(
-    // clang-format off
       Compressor::create_from_type(compression_type, stream, compression_level)
-    // clang-format on
-  )
+    )
 {
+  // clang-format on
   uint8_t header_bytes[15];
   memcpy(header_bytes, magic, 4);
   header_bytes[4] = version;