refactor(deps): from *.cpp to *.c
This commit is contained in:
4
deps/dablooms/CMakeLists.txt
vendored
4
deps/dablooms/CMakeLists.txt
vendored
@@ -1,5 +1,5 @@
|
||||
add_library(dablooms dablooms.cpp murmur.cpp)
|
||||
add_library(dablooms dablooms.c murmur.c)
|
||||
target_include_directories(dablooms PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_link_libraries(dablooms)
|
||||
target_link_libraries(dablooms m)
|
||||
|
||||
add_subdirectory(test)
|
||||
@@ -92,50 +92,50 @@ void MurmurHash3_x64_128(const void *key, const int len, const uint32_t seed, vo
|
||||
{
|
||||
case 15:
|
||||
k2 ^= ((uint64_t)tail[14]) << 48;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 14:
|
||||
k2 ^= ((uint64_t)tail[13]) << 40;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 13:
|
||||
k2 ^= ((uint64_t)tail[12]) << 32;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 12:
|
||||
k2 ^= ((uint64_t)tail[11]) << 24;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 11:
|
||||
k2 ^= ((uint64_t)tail[10]) << 16;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 10:
|
||||
k2 ^= ((uint64_t)tail[9]) << 8;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 9:
|
||||
k2 ^= ((uint64_t)tail[8]) << 0;
|
||||
k2 *= c2;
|
||||
k2 = ROTL64(k2, 33);
|
||||
k2 *= c1;
|
||||
h2 ^= k2;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 8:
|
||||
k1 ^= ((uint64_t)tail[7]) << 56;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 7:
|
||||
k1 ^= ((uint64_t)tail[6]) << 48;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 6:
|
||||
k1 ^= ((uint64_t)tail[5]) << 40;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 5:
|
||||
k1 ^= ((uint64_t)tail[4]) << 32;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 4:
|
||||
k1 ^= ((uint64_t)tail[3]) << 24;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 3:
|
||||
k1 ^= ((uint64_t)tail[2]) << 16;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 2:
|
||||
k1 ^= ((uint64_t)tail[1]) << 8;
|
||||
[[fallthrough]];
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
k1 ^= ((uint64_t)tail[0]) << 0;
|
||||
k1 *= c1;
|
||||
9
deps/dablooms/murmur.h
vendored
9
deps/dablooms/murmur.h
vendored
@@ -5,8 +5,17 @@
|
||||
#ifndef _MURMURHASH3_H_
|
||||
#define _MURMURHASH3_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void MurmurHash3_x64_128(const void *key, int len, uint32_t seed, void *out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _MURMURHASH3_H_
|
||||
|
||||
2
deps/interval_tree/CMakeLists.txt
vendored
2
deps/interval_tree/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
||||
add_library(interval_tree STATIC interval_tree.cpp)
|
||||
add_library(interval_tree STATIC interval_tree.c)
|
||||
target_include_directories(interval_tree PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_include_directories(interval_tree PUBLIC ${CMAKE_SOURCE_DIR}/deps/rbtree)
|
||||
target_link_libraries(interval_tree rbtree)
|
||||
|
||||
1
deps/interval_tree/interval_tree_generic.h
vendored
1
deps/interval_tree/interval_tree_generic.h
vendored
@@ -12,6 +12,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "rbtree_augmented.h"
|
||||
|
||||
/*
|
||||
|
||||
2
deps/rbtree/CMakeLists.txt
vendored
2
deps/rbtree/CMakeLists.txt
vendored
@@ -1,2 +1,2 @@
|
||||
add_library(rbtree STATIC rbtree.cpp)
|
||||
add_library(rbtree STATIC rbtree.c)
|
||||
target_include_directories(rbtree PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
1
deps/rbtree/rbtree.h
vendored
1
deps/rbtree/rbtree.h
vendored
@@ -22,6 +22,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct rb_node
|
||||
|
||||
2
deps/timeout/CMakeLists.txt
vendored
2
deps/timeout/CMakeLists.txt
vendored
@@ -1,2 +1,2 @@
|
||||
add_library(timeout STATIC timeout.cpp timeout-bitops.cpp)
|
||||
add_library(timeout STATIC timeout.c timeout-bitops.c)
|
||||
target_include_directories(timeout PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
@@ -136,7 +136,7 @@
|
||||
#define WHEEL_MASK (WHEEL_LEN - 1)
|
||||
#define TIMEOUT_MAX ((TIMEOUT_C(1) << (WHEEL_BIT * WHEEL_NUM)) - 1)
|
||||
|
||||
#include "timeout-bitops.cpp"
|
||||
#include "timeout-bitops.c"
|
||||
|
||||
#if WHEEL_BIT == 6
|
||||
#define ctz(n) ctz64(n)
|
||||
2
deps/toml/CMakeLists.txt
vendored
2
deps/toml/CMakeLists.txt
vendored
@@ -1,3 +1,3 @@
|
||||
add_library(toml toml.cpp)
|
||||
add_library(toml toml.c)
|
||||
target_include_directories(toml PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_link_libraries(toml)
|
||||
0
deps/toml/toml.cpp → deps/toml/toml.c
vendored
0
deps/toml/toml.cpp → deps/toml/toml.c
vendored
Reference in New Issue
Block a user