Skip to content

Commit 3f13357

Browse files
committed
update fmt. (#669)
1 parent 4bdc70c commit 3f13357

File tree

139 files changed

+2519
-2537
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+2519
-2537
lines changed

cpp/examples/cpp_examples/demo_read.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ int demo_read() {
4141
columns.emplace_back("s1");
4242

4343
auto table_schema = reader.get_table_schema(table_name);
44-
storage::Filter* tag_filter1 = storage::TagFilterBuilder(table_schema.get()).eq("id1", "id1_filed_1");
45-
storage::Filter* tag_filter2 = storage::TagFilterBuilder(table_schema.get()).eq("id2", "id1_filed_2");
46-
storage::Filter* tag_filter = storage::TagFilterBuilder(table_schema.get()).and_filter(tag_filter1, tag_filter2);
44+
storage::Filter* tag_filter1 =
45+
storage::TagFilterBuilder(table_schema.get()).eq("id1", "id1_filed_1");
46+
storage::Filter* tag_filter2 =
47+
storage::TagFilterBuilder(table_schema.get()).eq("id2", "id1_filed_2");
48+
storage::Filter* tag_filter = storage::TagFilterBuilder(table_schema.get())
49+
.and_filter(tag_filter1, tag_filter2);
4750
// Column vector contains the columns you want to select.
48-
HANDLE_ERROR(reader.query(table_name, columns, 0, 100, temp_ret, tag_filter));
51+
HANDLE_ERROR(
52+
reader.query(table_name, columns, 0, 100, temp_ret, tag_filter));
4953

5054
// Get query handler.
5155
auto ret = dynamic_cast<storage::TableResultSet*>(temp_ret);

cpp/examples/cpp_examples/demo_write.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "cpp_examples.h"
2525

2626
int demo_write() {
27-
2827
storage::libtsfile_init();
2928

3029
std::string table_name = "table1";
@@ -61,7 +60,6 @@ int demo_write() {
6160
common::ColumnCategory::FIELD},
6261
10);
6362

64-
6563
for (int row = 0; row < 5; row++) {
6664
long timestamp = row;
6765
tablet.add_timestamp(row, timestamp);

cpp/src/common/allocator/alloc_base.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ enum AllocModID {
7272
__MAX_MOD_ID = 127, // leave 1 bit to detect header size
7373
};
7474

75-
extern const char *g_mod_names[__LAST_MOD_ID];
75+
extern const char* g_mod_names[__LAST_MOD_ID];
7676

7777
/* very basic alloc/free interface in C style */
78-
void *mem_alloc(uint32_t size, AllocModID mid);
79-
void mem_free(void *ptr);
80-
void *mem_realloc(void *ptr, uint32_t size);
78+
void* mem_alloc(uint32_t size, AllocModID mid);
79+
void mem_free(void* ptr);
80+
void* mem_realloc(void* ptr, uint32_t size);
8181

8282
class ModStat {
8383
public:
8484
ModStat() : stat_arr_(NULL) {}
8585

86-
static ModStat &get_instance() {
86+
static ModStat& get_instance() {
8787
/*
8888
* This is the singleton of Mod Memory Statistic.
8989
* gms is short for Global Mod Statistic
@@ -108,23 +108,23 @@ class ModStat {
108108
#endif
109109

110110
private:
111-
INLINE int32_t *get_item(int8_t mid) {
111+
INLINE int32_t* get_item(int8_t mid) {
112112
return &(stat_arr_[mid * (ITEM_SIZE / sizeof(int32_t))]);
113113
}
114114

115115
private:
116116
static const int32_t ITEM_SIZE = CACHE_LINE_SIZE;
117117
static const int32_t ITEM_COUNT = __LAST_MOD_ID;
118-
int32_t *stat_arr_;
118+
int32_t* stat_arr_;
119119

120120
STATIC_ASSERT((ITEM_SIZE % sizeof(int32_t) == 0), ModStat_ITEM_SIZE_ERROR);
121121
};
122122

123123
/* base allocator */
124124
class BaseAllocator {
125125
public:
126-
void *alloc(uint32_t size, AllocModID mid) { return mem_alloc(size, mid); }
127-
void free(void *ptr) { mem_free(ptr); }
126+
void* alloc(uint32_t size, AllocModID mid) { return mem_alloc(size, mid); }
127+
void free(void* ptr) { mem_free(ptr); }
128128
};
129129

130130
extern BaseAllocator g_base_allocator;

0 commit comments

Comments
 (0)