diff --git a/include/BinLogBuf.h b/include/BinLogBuf.h index 7cc4d466db4aae5494dd971e2da615b62dc4e4f7..2b887f2a52a47cbc854d916a26dda67796d3718e 100644 --- a/include/BinLogBuf.h +++ b/include/BinLogBuf.h @@ -8,8 +8,8 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef BINLOG_BUF_H_ -#define BINLOG_BUF_H_ +#pragma once + #define LOG_EVENT_INIT_LEN (1024 * 32) #include #include @@ -120,5 +120,3 @@ static inline bool binlogBuf_NULL(BinLogBuf* buf) } // namespace logmessage } // namespace oceanbase - -#endif /* BINLOG_BUF_H_ */ diff --git a/include/Endian.h b/include/Endian.h index 6a143299e41734b4cefd5f404bb335fc75cbc81d..0a4ddbab8d014b3cbcb9bd8a65d366943349cfa8 100644 --- a/include/Endian.h +++ b/include/Endian.h @@ -8,8 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef ENDIANNESS_H -#define ENDIANNESS_H +#pragma once namespace oceanbase { namespace logmessage { @@ -141,5 +140,3 @@ static inline T toLeEndianByType(T value) } // namespace logmessage } // namespace oceanbase - -#endif diff --git a/include/LogMsgBuf.h b/include/LogMsgBuf.h index b7afc1bcf5a20a39880aea44c5d490224b99616a..ee6c97b4a997499f89b501571477011410a8718e 100644 --- a/include/LogMsgBuf.h +++ b/include/LogMsgBuf.h @@ -8,8 +8,8 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef _LOGMSGBUF_H_ -#define _LOGMSGBUF_H_ +#pragma once + #include #include @@ -40,5 +40,3 @@ size_t LogMsgAppendDataArray(uint8_t* sa, size_t size); } // namespace logmessage } // namespace oceanbase - -#endif /* _LOGMSGBUF_H_ */ diff --git a/include/LogMsgFactory.h b/include/LogMsgFactory.h index 4dc8a569611f5a9bf36010a064c7811417f286e4..58cbf906972e8a427f3b2cec4cf7910392dcbb0f 100644 --- a/include/LogMsgFactory.h +++ b/include/LogMsgFactory.h @@ -8,8 +8,8 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef __LOG_MSG_FACTORY__ -#define __LOG_MSG_FACTORY__ +#pragma once + #include namespace oceanbase { @@ -191,4 +191,3 @@ public: } // namespace logmessage } // namespace oceanbase -#endif diff --git a/include/LogRecord.h b/include/LogRecord.h index 78a338ea468458f74895c8bde780b3c3e36d2a85..6dce53978108d3a96f7692b5bdc8fdea2d60a89d 100644 --- a/include/LogRecord.h +++ b/include/LogRecord.h @@ -8,8 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef _LOG_REC_H_ -#define _LOG_REC_H_ +#pragma once #include #include @@ -442,5 +441,3 @@ protected: } // namespace logmessage } // namespace oceanbase - -#endif /*_LOG_REC_H_*/ diff --git a/include/MetaInfo.h b/include/MetaInfo.h index bb38cb25ffa99904c4df0e0db07afee6fbd65fde..5585ad0f881085fb1d20469fc540a5d3b15e99d8 100644 --- a/include/MetaInfo.h +++ b/include/MetaInfo.h @@ -8,8 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef _MD_H_ -#define _MD_H_ +#pragma once #include #include @@ -398,4 +397,3 @@ private: } // namespace logmessage } // namespace oceanbase -#endif diff --git a/include/MsgHeader.h b/include/MsgHeader.h index 190e70e1a9d1d529f6a6699905ad15570b10d960..a722c5cdbb15c1badfab2218b756c632f8f26c63 100644 --- a/include/MsgHeader.h +++ b/include/MsgHeader.h @@ -8,8 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef _MSG_HEADER_H_ -#define _MSG_HEADER_H_ +#pragma once #include @@ -26,5 +25,3 @@ struct MsgHeader { } // namespace logmessage } // namespace oceanbase - -#endif diff --git a/include/MsgType.h b/include/MsgType.h index 7593dbe8331f3c4e24065588bc623ebd4e1d8551..f9e62434c2f1856d5bf1e0901057c892b4686912 100644 --- a/include/MsgType.h +++ b/include/MsgType.h @@ -8,8 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef _MSG_TYPE_H_ -#define _MSG_TYPE_H_ +#pragma once #include @@ -52,4 +51,3 @@ public: } // namespace logmessage } // namespace oceanbase -#endif diff --git a/include/StrArray.h b/include/StrArray.h index 05df5f4df2dcc7490674e79b8d103855140297ad..f499e5358ba0ee5ae0dc42a2e6a97b163adb1b4b 100644 --- a/include/StrArray.h +++ b/include/StrArray.h @@ -8,8 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef _STR_ARRAY_H_ -#define _STR_ARRAY_H_ +#pragma once #include @@ -30,4 +29,3 @@ public: } // namespace logmessage } // namespace oceanbase -#endif diff --git a/include/UserData.h b/include/UserData.h index c44006757089d24b32ae01be8bc7263c50df4676..a9dedaac3c9d12c92dd9dfc15c6689b9f1b5ffa2 100644 --- a/include/UserData.h +++ b/include/UserData.h @@ -8,8 +8,7 @@ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. */ -#ifndef __USER_DATA_H__ -#define __USER_DATA_H__ +#pragma once namespace oceanbase { namespace logmessage { @@ -25,4 +24,3 @@ public: } // namespace logmessage } // namespace oceanbase -#endif