From be0ba76dff38513390d02e105643088adbb29704 Mon Sep 17 00:00:00 2001 From: hongbin Date: Mon, 18 Apr 2022 09:54:59 +0800 Subject: [PATCH] [Refactor] Use '#pragma once' to replace '#define' and '#endif' (#9062) --- be/src/olap/base_compaction.h | 4 +--- be/src/olap/base_tablet.h | 4 +--- be/src/olap/bhp_lib.h | 5 +---- be/src/olap/block_column_predicate.h | 4 +--- be/src/olap/bloom_filter_predicate.h | 4 +--- be/src/olap/bloom_filter_reader.h | 5 ++--- be/src/olap/bloom_filter_writer.h | 5 ++--- be/src/olap/byte_buffer.h | 5 ++--- be/src/olap/column_predicate.h | 4 +--- be/src/olap/compaction.h | 4 +--- be/src/olap/comparison_predicate.h | 4 +--- be/src/olap/compress.h | 5 ++--- be/src/olap/cumulative_compaction.h | 4 +--- be/src/olap/cumulative_compaction_policy.h | 5 ++--- be/src/olap/delete_handler.h | 5 ++--- be/src/olap/delta_writer.h | 4 +--- be/src/olap/field.h | 4 +--- be/src/olap/file_helper.h | 4 +--- be/src/olap/file_stream.h | 4 +--- be/src/olap/generic_iterators.h | 2 ++ be/src/olap/hll.h | 4 +--- be/src/olap/in_list_predicate.h | 5 +---- be/src/olap/in_stream.h | 4 +--- be/src/olap/lru_cache.h | 4 +--- be/src/olap/memtable.h | 4 +--- be/src/olap/merger.h | 4 +--- be/src/olap/null_predicate.h | 4 +--- be/src/olap/olap_common.h | 4 +--- be/src/olap/olap_cond.h | 4 +--- be/src/olap/olap_index.h | 4 +--- be/src/olap/olap_meta.h | 4 +--- be/src/olap/out_stream.h | 5 ++--- be/src/olap/push_handler.h | 4 +--- be/src/olap/reader.h | 4 +--- be/src/olap/row_block.h | 4 +--- be/src/olap/row_cursor.h | 4 +--- be/src/olap/schema_change.h | 4 +--- be/src/olap/serialize.h | 4 +--- be/src/olap/skiplist.h | 4 +--- be/src/olap/snapshot_manager.h | 4 +--- be/src/olap/storage_engine.h | 4 +--- be/src/olap/stream_index_common.h | 4 +--- be/src/olap/stream_index_reader.h | 5 ++--- be/src/olap/stream_index_writer.h | 5 ++--- be/src/olap/stream_name.h | 4 +--- be/src/olap/tablet.h | 5 ++--- be/src/olap/tablet_manager.h | 4 +--- be/src/olap/tablet_meta.h | 4 +--- be/src/olap/tablet_meta_manager.h | 4 +--- be/src/olap/tablet_schema.h | 4 +--- be/src/olap/tuple_reader.h | 4 +--- be/src/olap/txn_manager.h | 5 ++--- be/src/olap/types.h | 4 +--- be/src/olap/utils.h | 4 +--- be/src/olap/version_graph.h | 4 +--- be/src/olap/wrapper_field.h | 4 +--- 56 files changed, 68 insertions(+), 167 deletions(-) diff --git a/be/src/olap/base_compaction.h b/be/src/olap/base_compaction.h index 8425a5dbe4..65b05f8bfa 100644 --- a/be/src/olap/base_compaction.h +++ b/be/src/olap/base_compaction.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_BASE_COMPACTION_H -#define DORIS_BE_SRC_OLAP_BASE_COMPACTION_H +#pragma once #include "olap/compaction.h" @@ -53,4 +52,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_BASE_COMPACTION_H diff --git a/be/src/olap/base_tablet.h b/be/src/olap/base_tablet.h index ead5e04013..2e3d2cfcf4 100644 --- a/be/src/olap/base_tablet.h +++ b/be/src/olap/base_tablet.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_BASE_TABLET_H -#define DORIS_BE_SRC_OLAP_BASE_TABLET_H +#pragma once #include @@ -151,4 +150,3 @@ inline const TabletSchema& BaseTablet::tablet_schema() const { } /* namespace doris */ -#endif /* DORIS_BE_SRC_OLAP_BASE_TABLET_H */ diff --git a/be/src/olap/bhp_lib.h b/be/src/olap/bhp_lib.h index 58be76e23c..043bde85a5 100644 --- a/be/src/olap/bhp_lib.h +++ b/be/src/olap/bhp_lib.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_BHP_LIB_H -#define DORIS_BE_SRC_OLAP_BHP_LIB_H +#pragma once #include @@ -752,5 +751,3 @@ inline int baidu_crc32_qw(char const* src, int crc, unsigned int length) { } } // namespace doris - -#endif // DORIS_BE_SRC_OLAP_BHP_LIB_H diff --git a/be/src/olap/block_column_predicate.h b/be/src/olap/block_column_predicate.h index 6f679dbf25..1927c9477e 100644 --- a/be/src/olap/block_column_predicate.h +++ b/be/src/olap/block_column_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_BLOCK_COLUMN_PREDICATE_H -#define DORIS_BE_SRC_OLAP_BLOCK_COLUMN_PREDICATE_H +#pragma once #include @@ -138,4 +137,3 @@ public: } //namespace doris -#endif //DORIS_BE_SRC_OLAP_COLUMN_PREDICATE_H diff --git a/be/src/olap/bloom_filter_predicate.h b/be/src/olap/bloom_filter_predicate.h index fa65293d30..8094b7b9b0 100644 --- a/be/src/olap/bloom_filter_predicate.h +++ b/be/src/olap/bloom_filter_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_BLOOM_FILTER_PREDICATE_H -#define DORIS_BE_SRC_OLAP_BLOOM_FILTER_PREDICATE_H +#pragma once #include @@ -148,4 +147,3 @@ public: } //namespace doris -#endif //DORIS_BE_SRC_OLAP_BLOOM_FILTER_PREDICATE_H diff --git a/be/src/olap/bloom_filter_reader.h b/be/src/olap/bloom_filter_reader.h index aa337e42d5..4098140b87 100644 --- a/be/src/olap/bloom_filter_reader.h +++ b/be/src/olap/bloom_filter_reader.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_BLOOM_FILTER_READER_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_BLOOM_FILTER_READER_H +#pragma once #include @@ -65,4 +64,4 @@ private: }; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_BLOOM_FILTER_READER_H + diff --git a/be/src/olap/bloom_filter_writer.h b/be/src/olap/bloom_filter_writer.h index 15313cbdb9..f07a505542 100644 --- a/be/src/olap/bloom_filter_writer.h +++ b/be/src/olap/bloom_filter_writer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_BLOOM_FILTER_WRITER_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_BLOOM_FILTER_WRITER_H +#pragma once #include @@ -41,4 +40,4 @@ private: }; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_BLOOM_FILTER_WRITER_H + diff --git a/be/src/olap/byte_buffer.h b/be/src/olap/byte_buffer.h index 9d142c3bd0..9055eb305e 100644 --- a/be/src/olap/byte_buffer.h +++ b/be/src/olap/byte_buffer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_BYTE_BUFFER_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_BYTE_BUFFER_H +#pragma once #include "olap/file_helper.h" #include "olap/olap_define.h" @@ -209,4 +208,4 @@ private: }; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_BYTE_BUFFER_H + diff --git a/be/src/olap/column_predicate.h b/be/src/olap/column_predicate.h index 45f8fcfa7f..c544968d54 100644 --- a/be/src/olap/column_predicate.h +++ b/be/src/olap/column_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_PREDICATE_H -#define DORIS_BE_SRC_OLAP_COLUMN_PREDICATE_H +#pragma once #include @@ -95,4 +94,3 @@ protected: } //namespace doris -#endif //DORIS_BE_SRC_OLAP_COLUMN_PREDICATE_H diff --git a/be/src/olap/compaction.h b/be/src/olap/compaction.h index 43c0acc7f1..1f15e8df89 100644 --- a/be/src/olap/compaction.h +++ b/be/src/olap/compaction.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COMPACTION_H -#define DORIS_BE_SRC_OLAP_COMPACTION_H +#pragma once #include @@ -103,4 +102,3 @@ protected: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COMPACTION_H diff --git a/be/src/olap/comparison_predicate.h b/be/src/olap/comparison_predicate.h index 3df31c370d..7c3247bd55 100644 --- a/be/src/olap/comparison_predicate.h +++ b/be/src/olap/comparison_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COMPARISON_PREDICATE_H -#define DORIS_BE_SRC_OLAP_COMPARISON_PREDICATE_H +#pragma once #include @@ -63,4 +62,3 @@ COMPARISON_PRED_CLASS_DEFINE(GreaterEqualPredicate, GE) } //namespace doris -#endif //DORIS_BE_SRC_OLAP_COMPARISON_PREDICATE_H diff --git a/be/src/olap/compress.h b/be/src/olap/compress.h index 6b853475d3..71f641c8b0 100644 --- a/be/src/olap/compress.h +++ b/be/src/olap/compress.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_COMPRESS_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_COMPRESS_H +#pragma once #include "olap/olap_define.h" @@ -54,4 +53,4 @@ Status lz4_compress(StorageByteBuffer* in, StorageByteBuffer* out, bool* smaller Status lz4_decompress(StorageByteBuffer* in, StorageByteBuffer* out); } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_COMPRESS_H + diff --git a/be/src/olap/cumulative_compaction.h b/be/src/olap/cumulative_compaction.h index a15394f8cc..7eb504c74f 100644 --- a/be/src/olap/cumulative_compaction.h +++ b/be/src/olap/cumulative_compaction.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_CUMULATIVE_COMPACTION_H -#define DORIS_BE_SRC_OLAP_CUMULATIVE_COMPACTION_H +#pragma once #include @@ -50,4 +49,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_CUMULATIVE_COMPACTION_H diff --git a/be/src/olap/cumulative_compaction_policy.h b/be/src/olap/cumulative_compaction_policy.h index 0f913ff4bb..bfc9cc218d 100644 --- a/be/src/olap/cumulative_compaction_policy.h +++ b/be/src/olap/cumulative_compaction_policy.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef OLAP_CUMULATIVE_COMPACTION_POLICY_H -#define OLAP_CUMULATIVE_COMPACTION_POLICY_H +#pragma once #include @@ -261,4 +260,4 @@ private: }; } // namespace doris -#endif // OLAP_CUMULATIVE_COMPACTION_POLICY_H + diff --git a/be/src/olap/delete_handler.h b/be/src/olap/delete_handler.h index 70c95ce49e..2e198274f9 100644 --- a/be/src/olap/delete_handler.h +++ b/be/src/olap/delete_handler.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_DELETE_HANDLER_H -#define DORIS_BE_SRC_OLAP_DELETE_HANDLER_H +#pragma once #include #include @@ -140,4 +139,4 @@ private: }; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_DELETE_HANDLER_H + diff --git a/be/src/olap/delta_writer.h b/be/src/olap/delta_writer.h index e026919325..62bad10fc1 100644 --- a/be/src/olap/delta_writer.h +++ b/be/src/olap/delta_writer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_DELTA_WRITER_H -#define DORIS_BE_SRC_DELTA_WRITER_H +#pragma once #include "gen_cpp/internal_service.pb.h" #include "olap/rowset/rowset_writer.h" @@ -122,4 +121,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_DELTA_WRITER_H diff --git a/be/src/olap/field.h b/be/src/olap/field.h index f21c21e74b..8251f057a9 100644 --- a/be/src/olap/field.h +++ b/be/src/olap/field.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_FIELD_H -#define DORIS_BE_SRC_OLAP_FIELD_H +#pragma once #include #include @@ -792,4 +791,3 @@ public: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_FIELD_H diff --git a/be/src/olap/file_helper.h b/be/src/olap/file_helper.h index 6a4a93564f..3dabdc6fff 100644 --- a/be/src/olap/file_helper.h +++ b/be/src/olap/file_helper.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_FILE_HELPER_H -#define DORIS_BE_SRC_OLAP_FILE_HELPER_H +#pragma once #include #include @@ -435,4 +434,3 @@ Status FileHeader::validate( } // namespace doris -#endif // DORIS_BE_SRC_OLAP_FILE_HELPER_H diff --git a/be/src/olap/file_stream.h b/be/src/olap/file_stream.h index 2ebcb8a183..ff71d93206 100644 --- a/be/src/olap/file_stream.h +++ b/be/src/olap/file_stream.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_FILE_STREAM_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_FILE_STREAM_H +#pragma once #include @@ -274,4 +273,3 @@ inline Status ReadOnlyFileStream::read_all(char* buffer, uint64_t* buffer_size) } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_FILE_STREAM_H diff --git a/be/src/olap/generic_iterators.h b/be/src/olap/generic_iterators.h index 5ff287b8d7..11e024fa0f 100644 --- a/be/src/olap/generic_iterators.h +++ b/be/src/olap/generic_iterators.h @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +#pragma once + #include "olap/iterators.h" namespace doris { diff --git a/be/src/olap/hll.h b/be/src/olap/hll.h index 47cae354e7..7d07c1f266 100644 --- a/be/src/olap/hll.h +++ b/be/src/olap/hll.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_HLL_H -#define DORIS_BE_SRC_OLAP_HLL_H +#pragma once #include #include @@ -383,4 +382,3 @@ public: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_HLL_H diff --git a/be/src/olap/in_list_predicate.h b/be/src/olap/in_list_predicate.h index 089ee84a06..b437384666 100644 --- a/be/src/olap/in_list_predicate.h +++ b/be/src/olap/in_list_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_IN_LIST_PREDICATE_H -#define DORIS_BE_SRC_OLAP_IN_LIST_PREDICATE_H +#pragma once #include #include @@ -107,5 +106,3 @@ IN_LIST_PRED_CLASS_DEFINE(InListPredicate, IN_LIST) IN_LIST_PRED_CLASS_DEFINE(NotInListPredicate, NO_IN_LIST) } //namespace doris - -#endif //DORIS_BE_SRC_OLAP_IN_LIST_PREDICATE_H diff --git a/be/src/olap/in_stream.h b/be/src/olap/in_stream.h index 6d9ce10867..29bae381e2 100644 --- a/be/src/olap/in_stream.h +++ b/be/src/olap/in_stream.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_IN_STREAM_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_IN_STREAM_H +#pragma once #include @@ -191,4 +190,3 @@ inline Status InStream::read(char* buffer, uint64_t* buf_size) { } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_IN_STREAM_H diff --git a/be/src/olap/lru_cache.h b/be/src/olap/lru_cache.h index d0d656a882..4d320c2f90 100644 --- a/be/src/olap/lru_cache.h +++ b/be/src/olap/lru_cache.h @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#ifndef DORIS_BE_SRC_OLAP_LRU_CACHE_H -#define DORIS_BE_SRC_OLAP_LRU_CACHE_H +#pragma once #include #include @@ -397,4 +396,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_LRU_CACHE_H diff --git a/be/src/olap/memtable.h b/be/src/olap/memtable.h index cad27ae1a2..3fad1ac073 100644 --- a/be/src/olap/memtable.h +++ b/be/src/olap/memtable.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_MEMTABLE_H -#define DORIS_BE_SRC_OLAP_MEMTABLE_H +#pragma once #include @@ -135,4 +134,3 @@ inline std::ostream& operator<<(std::ostream& os, const MemTable& table) { } // namespace doris -#endif // DORIS_BE_SRC_OLAP_MEMTABLE_H diff --git a/be/src/olap/merger.h b/be/src/olap/merger.h index c2047d07d9..efd46271e1 100644 --- a/be/src/olap/merger.h +++ b/be/src/olap/merger.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_MERGER_H -#define DORIS_BE_SRC_OLAP_MERGER_H +#pragma once #include "olap/olap_define.h" #include "olap/rowset/rowset_writer.h" @@ -43,4 +42,3 @@ public: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_MERGER_H diff --git a/be/src/olap/null_predicate.h b/be/src/olap/null_predicate.h index 7b90ffbf92..cd724f9eed 100644 --- a/be/src/olap/null_predicate.h +++ b/be/src/olap/null_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_NULL_PREDICATE_H -#define DORIS_BE_SRC_OLAP_NULL_PREDICATE_H +#pragma once #include @@ -59,4 +58,3 @@ private: } //namespace doris -#endif //DORIS_BE_SRC_OLAP_NULL_PREDICATE_H diff --git a/be/src/olap/olap_common.h b/be/src/olap/olap_common.h index ebc76d21e0..8e7f7a16c3 100644 --- a/be/src/olap/olap_common.h +++ b/be/src/olap/olap_common.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_OLAP_COMMON_H -#define DORIS_BE_SRC_OLAP_OLAP_COMMON_H +#pragma once #include @@ -390,4 +389,3 @@ struct RowsetId { } // namespace doris -#endif // DORIS_BE_SRC_OLAP_OLAP_COMMON_H diff --git a/be/src/olap/olap_cond.h b/be/src/olap/olap_cond.h index 490c21f136..a86afaf47a 100644 --- a/be/src/olap/olap_cond.h +++ b/be/src/olap/olap_cond.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_OLAP_COND_H -#define DORIS_BE_SRC_OLAP_OLAP_COND_H +#pragma once #include #include @@ -201,4 +200,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_OLAP_COND_H diff --git a/be/src/olap/olap_index.h b/be/src/olap/olap_index.h index 422749beb7..191d4e151f 100644 --- a/be/src/olap/olap_index.h +++ b/be/src/olap/olap_index.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_OLAP_INDEX_H -#define DORIS_BE_SRC_OLAP_OLAP_INDEX_H +#pragma once #include #include @@ -380,4 +379,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_OLAP_INDEX_H diff --git a/be/src/olap/olap_meta.h b/be/src/olap/olap_meta.h index c6495fc295..03e542f8d6 100644 --- a/be/src/olap/olap_meta.h +++ b/be/src/olap/olap_meta.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_OLAP_OLAP_META_H -#define DORIS_BE_SRC_OLAP_OLAP_OLAP_META_H +#pragma once #include #include @@ -56,4 +55,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_OLAP_OLAP_META_H diff --git a/be/src/olap/out_stream.h b/be/src/olap/out_stream.h index 79e29a6322..a67a6c5204 100644 --- a/be/src/olap/out_stream.h +++ b/be/src/olap/out_stream.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_OUT_STREAM_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_OUT_STREAM_H +#pragma once #include "olap/byte_buffer.h" #include "olap/compress.h" @@ -169,4 +168,4 @@ protected: */ } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_OUT_STREAM_H + diff --git a/be/src/olap/push_handler.h b/be/src/olap/push_handler.h index aa1aa6eb10..16ebfe4b12 100644 --- a/be/src/olap/push_handler.h +++ b/be/src/olap/push_handler.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_PUSH_HANDLER_H -#define DORIS_BE_SRC_OLAP_PUSH_HANDLER_H +#pragma once #include #include @@ -220,4 +219,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_PUSH_HANDLER_H diff --git a/be/src/olap/reader.h b/be/src/olap/reader.h index 1c68834349..88b5cafc42 100644 --- a/be/src/olap/reader.h +++ b/be/src/olap/reader.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_READER_H -#define DORIS_BE_SRC_OLAP_READER_H +#pragma once #include #include @@ -231,4 +230,3 @@ protected: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_READER_H diff --git a/be/src/olap/row_block.h b/be/src/olap/row_block.h index bc7cb28164..0e64453e62 100644 --- a/be/src/olap/row_block.h +++ b/be/src/olap/row_block.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_ROW_BLOCK_H -#define DORIS_BE_SRC_OLAP_ROW_BLOCK_H +#pragma once #include #include @@ -142,4 +141,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_ROW_BLOCK_H diff --git a/be/src/olap/row_cursor.h b/be/src/olap/row_cursor.h index 8f018eef1a..2474393f41 100644 --- a/be/src/olap/row_cursor.h +++ b/be/src/olap/row_cursor.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_ROW_CURSOR_H -#define DORIS_BE_SRC_OLAP_ROW_CURSOR_H +#pragma once #include #include @@ -172,4 +171,3 @@ private: }; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_ROW_CURSOR_H diff --git a/be/src/olap/schema_change.h b/be/src/olap/schema_change.h index d5c1f39b77..1d55b29e0b 100644 --- a/be/src/olap/schema_change.h +++ b/be/src/olap/schema_change.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_SCHEMA_CHANGE_H -#define DORIS_BE_SRC_OLAP_SCHEMA_CHANGE_H +#pragma once #include #include @@ -247,4 +246,3 @@ private: using RowBlockDeleter = std::function; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_SCHEMA_CHANGE_H diff --git a/be/src/olap/serialize.h b/be/src/olap/serialize.h index 5a796b0b40..01feeb3a9c 100644 --- a/be/src/olap/serialize.h +++ b/be/src/olap/serialize.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_SERIALIZE_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_SERIALIZE_H +#pragma once #include "olap/byte_buffer.h" #include "olap/olap_define.h" @@ -184,4 +183,3 @@ inline bool is_safe_subtract(int64_t left, int64_t right) { } // namespace ser } // namespace doris -#endif diff --git a/be/src/olap/skiplist.h b/be/src/olap/skiplist.h index c181c9fa64..0e28d3c9cc 100644 --- a/be/src/olap/skiplist.h +++ b/be/src/olap/skiplist.h @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#ifndef DORIS_BE_SRC_OLAP_SKIPLIST_H -#define DORIS_BE_SRC_OLAP_SKIPLIST_H +#pragma once // Thread safety // ------------- @@ -462,4 +461,3 @@ bool SkipList::Find(const Key& key, Hint* hint) const { } // namespace doris -#endif // DORIS_BE_SRC_OLAP_SKIPLIST_H diff --git a/be/src/olap/snapshot_manager.h b/be/src/olap/snapshot_manager.h index 129008b63e..d5560ddf45 100644 --- a/be/src/olap/snapshot_manager.h +++ b/be/src/olap/snapshot_manager.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_SNAPSHOT_MANAGER_H -#define DORIS_BE_SRC_OLAP_SNAPSHOT_MANAGER_H +#pragma once #include #include @@ -104,4 +103,3 @@ private: } // namespace doris -#endif diff --git a/be/src/olap/storage_engine.h b/be/src/olap/storage_engine.h index 84e955c7b0..0cc0076007 100644 --- a/be/src/olap/storage_engine.h +++ b/be/src/olap/storage_engine.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_STORAGE_ENGINE_H -#define DORIS_BE_SRC_OLAP_STORAGE_ENGINE_H +#pragma once #include #include @@ -396,4 +395,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_STORAGE_ENGINE_H diff --git a/be/src/olap/stream_index_common.h b/be/src/olap/stream_index_common.h index 289d7a330a..25f501f140 100644 --- a/be/src/olap/stream_index_common.h +++ b/be/src/olap/stream_index_common.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_COMMON_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_COMMON_H +#pragma once #include @@ -94,4 +93,3 @@ protected: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_COMMON_H diff --git a/be/src/olap/stream_index_reader.h b/be/src/olap/stream_index_reader.h index 532121d6fe..92bbbebc02 100644 --- a/be/src/olap/stream_index_reader.h +++ b/be/src/olap/stream_index_reader.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_READER_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_READER_H +#pragma once #include "olap/olap_define.h" #include "olap/stream_index_common.h" @@ -90,4 +89,4 @@ private: }; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_READER_H + diff --git a/be/src/olap/stream_index_writer.h b/be/src/olap/stream_index_writer.h index 451dc70505..6e60a7d918 100644 --- a/be/src/olap/stream_index_writer.h +++ b/be/src/olap/stream_index_writer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_WRITER_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_WRITER_H +#pragma once #include @@ -77,4 +76,4 @@ protected: }; } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_INDEX_WRITER_H + diff --git a/be/src/olap/stream_name.h b/be/src/olap/stream_name.h index b46ad165a3..304986548d 100644 --- a/be/src/olap/stream_name.h +++ b/be/src/olap/stream_name.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_NAME_H -#define DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_NAME_H +#pragma once #include @@ -43,4 +42,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_COLUMN_FILE_STREAM_NAME_H diff --git a/be/src/olap/tablet.h b/be/src/olap/tablet.h index 2582da46e3..e043204af5 100644 --- a/be/src/olap/tablet.h +++ b/be/src/olap/tablet.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TABLET_H -#define DORIS_BE_SRC_OLAP_TABLET_H +#pragma once + #include #include #include @@ -454,4 +454,3 @@ inline size_t Tablet::row_size() const { } // namespace doris -#endif // DORIS_BE_SRC_OLAP_TABLET_H diff --git a/be/src/olap/tablet_manager.h b/be/src/olap/tablet_manager.h index 65fd3b4eb5..2fc565e39a 100644 --- a/be/src/olap/tablet_manager.h +++ b/be/src/olap/tablet_manager.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TABLET_MANAGER_H -#define DORIS_BE_SRC_OLAP_TABLET_MANAGER_H +#pragma once #include #include @@ -224,4 +223,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_TABLET_MANAGER_H diff --git a/be/src/olap/tablet_meta.h b/be/src/olap/tablet_meta.h index b6071fe593..73dfc68743 100644 --- a/be/src/olap/tablet_meta.h +++ b/be/src/olap/tablet_meta.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TABLET_META_H -#define DORIS_BE_SRC_OLAP_TABLET_META_H +#pragma once #include #include @@ -332,4 +331,3 @@ bool operator!=(const TabletMeta& a, const TabletMeta& b); } // namespace doris -#endif // DORIS_BE_SRC_OLAP_OLAP_TABLET_META_H diff --git a/be/src/olap/tablet_meta_manager.h b/be/src/olap/tablet_meta_manager.h index 0eb4071545..be693c3040 100644 --- a/be/src/olap/tablet_meta_manager.h +++ b/be/src/olap/tablet_meta_manager.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TABLET_META_MANAGER_H -#define DORIS_BE_SRC_OLAP_TABLET_META_MANAGER_H +#pragma once #include @@ -58,4 +57,3 @@ public: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_TABLET_META_MANAGER_H diff --git a/be/src/olap/tablet_schema.h b/be/src/olap/tablet_schema.h index f87a4dd818..d93d7a21b6 100644 --- a/be/src/olap/tablet_schema.h +++ b/be/src/olap/tablet_schema.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TABLET_SCHEMA_H -#define DORIS_BE_SRC_OLAP_TABLET_SCHEMA_H +#pragma once #include @@ -183,4 +182,3 @@ bool operator!=(const TabletSchema& a, const TabletSchema& b); } // namespace doris -#endif // DORIS_BE_SRC_OLAP_TABLET_SCHEMA_H diff --git a/be/src/olap/tuple_reader.h b/be/src/olap/tuple_reader.h index f5b45a87ea..2150d3f2f8 100644 --- a/be/src/olap/tuple_reader.h +++ b/be/src/olap/tuple_reader.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TUPLE_READER_H -#define DORIS_BE_SRC_OLAP_TUPLE_READER_H +#pragma once #include #include @@ -90,4 +89,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_TUPLE_READER_H diff --git a/be/src/olap/txn_manager.h b/be/src/olap/txn_manager.h index c454537475..81f78ff93a 100644 --- a/be/src/olap/txn_manager.h +++ b/be/src/olap/txn_manager.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TXN_MANAGER_H -#define DORIS_BE_SRC_OLAP_TXN_MANAGER_H +#pragma once #include #include @@ -210,4 +209,4 @@ inline std::mutex& TxnManager::_get_txn_lock(TTransactionId transactionId) { } } // namespace doris -#endif // DORIS_BE_SRC_OLAP_TXN_MANAGER_H + diff --git a/be/src/olap/types.h b/be/src/olap/types.h index 457dfb2aa4..51345facd2 100644 --- a/be/src/olap/types.h +++ b/be/src/olap/types.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_TYPES_H -#define DORIS_BE_SRC_OLAP_TYPES_H +#pragma once #include #include @@ -1282,4 +1281,3 @@ inline const TypeInfo* get_collection_type_info() { } // namespace doris -#endif // DORIS_BE_SRC_OLAP_TYPES_H diff --git a/be/src/olap/utils.h b/be/src/olap/utils.h index 3c2599f25d..2c612fbe02 100644 --- a/be/src/olap/utils.h +++ b/be/src/olap/utils.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_UTILS_H -#define DORIS_BE_SRC_OLAP_UTILS_H +#pragma once #include #include @@ -316,4 +315,3 @@ bool valid_bool(const std::string& value_str); } // namespace doris -#endif // DORIS_BE_SRC_OLAP_UTILS_H diff --git a/be/src/olap/version_graph.h b/be/src/olap/version_graph.h index 50c7acf492..3383f3fd6e 100644 --- a/be/src/olap/version_graph.h +++ b/be/src/olap/version_graph.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_VERSION_GRAPH_H -#define DORIS_BE_SRC_OLAP_VERSION_GRAPH_H +#pragma once #include #include @@ -214,4 +213,3 @@ private: } // namespace doris -#endif // DORIS_BE_SRC_OLAP_OLAP_VERSION_GRAPH_H diff --git a/be/src/olap/wrapper_field.h b/be/src/olap/wrapper_field.h index 7ab9696fd3..4663da68d0 100644 --- a/be/src/olap/wrapper_field.h +++ b/be/src/olap/wrapper_field.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_WRAPPER_FIELD_H -#define DORIS_BE_SRC_OLAP_WRAPPER_FIELD_H +#pragma once #include "olap/field.h" #include "olap/olap_define.h" @@ -117,4 +116,3 @@ private: } // namespace doris -#endif