]> git.sesse.net Git - plocate/commitdiff
Run clang-format.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Thu, 15 Oct 2020 22:23:11 +0000 (00:23 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Thu, 15 Oct 2020 22:23:43 +0000 (00:23 +0200)
bench.cpp
plocate.cpp
serializer.cpp
serializer.h

index 0541cdc1585efdb1b8041cb74e2930542c4420eb..7bc49cdb8638ff5aaa2f3efef6ee3148f13250bc 100644 (file)
--- a/bench.cpp
+++ b/bench.cpp
@@ -2,8 +2,8 @@
 #include <fcntl.h>
 #include <memory>
 #include <stdio.h>
-#include <unistd.h>
 #include <string>
+#include <unistd.h>
 
 #define dprintf(...)
 //#define dprintf(...) fprintf(stderr, __VA_ARGS__);
index 2f3129326662bd52512f9ed50ba011acf627627f..c270e79eff24f99481dca08ae47b4cc7abdf6651 100644 (file)
@@ -24,9 +24,9 @@
 #include <memory>
 #include <mutex>
 #include <regex.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <stdint.h>
 #include <string.h>
 #include <string>
 #include <string_view>
@@ -404,7 +404,7 @@ uint64_t scan_all_docids(const vector<Needle> &needles, int fd, const Corpus &co
        uint32_t num_blocks = corpus.get_num_filename_blocks();
        unique_ptr<uint64_t[]> offsets(new uint64_t[num_blocks + 1]);
        complete_pread(fd, offsets.get(), (num_blocks + 1) * sizeof(uint64_t), corpus.offset_for_block(0));
-       atomic<uint64_t> matched{0};
+       atomic<uint64_t> matched{ 0 };
 
        mutex mu;
        condition_variable queue_added, queue_removed;
index 9277125927b1681c501fadc8c2cdaff5a4db897a..10a156411b5e551cec7e51be66907fef545a80c0 100644 (file)
@@ -1,13 +1,14 @@
+#include "serializer.h"
+
+#include "dprintf.h"
+
+#include <chrono>
 #include <inttypes.h>
+#include <memory>
 #include <stdio.h>
 #include <stdlib.h>
-#include <chrono>
-#include <memory>
 #include <utility>
 
-#include "dprintf.h"
-#include "serializer.h"
-
 using namespace std;
 using namespace std::chrono;
 
@@ -64,4 +65,3 @@ void Serializer::print(uint64_t seq, uint64_t skip, const string msg)
                pending.pop();
        }
 }
-
index 580e91d84737ac69c1b3b22167f4133aef5bf10a..e34b56defe73adbe84042bdf5fe7c4a2284b7c5e 100644 (file)
@@ -1,13 +1,13 @@
 #ifndef _SERIALIZER_H
 #define _SERIALIZER_H 1
 
+#include "options.h"
+
 #include <assert.h>
 #include <bits/stdint-uintn.h>
 #include <queue>
 #include <string>
 
-#include "options.h"
-
 class ResultReceiver {
 public:
        virtual ~ResultReceiver() = default;