Loading CMakeLists.txt +6 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_EXTENSIONS OFF) option(SLED_BUILD_BENCHMARK "Build benchmark" OFF) option(SLED_BUILD_TESTS "Build tests" OFF) set(BUILD_STATIC ON) set(BUILD_RTTR_DYNAMIC OFF) Loading Loading @@ -61,3 +62,8 @@ if(SLED_BUILD_BENCHMARK) target_link_libraries(sled_benchmark PRIVATE sled benchmark::benchmark benchmark::benchmark_main) endif(SLED_BUILD_BENCHMARK) if(SLED_BUILD_TESTS) find_package(gtest REQUIRED) add_executable(sled_tests "") endif(SLED_BUILD_TESTS) include/sled/any.h +4 −3 Original line number Diff line number Diff line Loading @@ -21,8 +21,9 @@ * (See accompanying file LICENSE.md or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef ANY_H #define ANY_H #pragma once #ifndef SLED_ANY_H #define SLED_ANY_H #include <algorithm> #include <memory> Loading Loading @@ -333,4 +334,4 @@ any_cast(any &&operand) }// namespace sled #endif /* ANY_H */ #endif /* SLED_ANY_H */ include/sled/buffer.h +4 −3 Original line number Diff line number Diff line Loading @@ -4,8 +4,9 @@ * @license : MIT **/ #ifndef BUFFER_H #define BUFFER_H #pragma once #ifndef SLED_BUFFER_H #define SLED_BUFFER_H #include <cstring> #include <memory> #include <stdint.h> Loading Loading @@ -275,4 +276,4 @@ using ZeroOnFreeBuffer = BufferT<T, true>; }// namespace sled #endif// BUFFER_H #endif// SLED_BUFFER_H include/sled/byte_order.h +5 −0 Original line number Diff line number Diff line #progam once #ifndef SLED_BYTE_ORDER_H #define SLED_BYTE_ORDER_H #include <arpa/inet.h> #if defined(__APPLE__) Loading Loading @@ -48,3 +51,5 @@ NetworkToHost32(uint32_t n) { return be32toh(n); } #endif // SLED_BYTE_ORDER_H include/sled/cleanup.h +4 −3 Original line number Diff line number Diff line Loading @@ -4,8 +4,9 @@ * @license : MIT **/ #ifndef CLEANUP_H #define CLEANUP_H #pragma once #ifndef SLED_CLEANUP_H #define SLED_CLEANUP_H #include "sled/optional.h" Loading Loading @@ -64,4 +65,4 @@ MakeCleanup(Callback callback) }// namespace sled #endif// CLEANUP_H #endif// SLED_CLEANUP_H Loading
CMakeLists.txt +6 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_EXTENSIONS OFF) option(SLED_BUILD_BENCHMARK "Build benchmark" OFF) option(SLED_BUILD_TESTS "Build tests" OFF) set(BUILD_STATIC ON) set(BUILD_RTTR_DYNAMIC OFF) Loading Loading @@ -61,3 +62,8 @@ if(SLED_BUILD_BENCHMARK) target_link_libraries(sled_benchmark PRIVATE sled benchmark::benchmark benchmark::benchmark_main) endif(SLED_BUILD_BENCHMARK) if(SLED_BUILD_TESTS) find_package(gtest REQUIRED) add_executable(sled_tests "") endif(SLED_BUILD_TESTS)
include/sled/any.h +4 −3 Original line number Diff line number Diff line Loading @@ -21,8 +21,9 @@ * (See accompanying file LICENSE.md or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef ANY_H #define ANY_H #pragma once #ifndef SLED_ANY_H #define SLED_ANY_H #include <algorithm> #include <memory> Loading Loading @@ -333,4 +334,4 @@ any_cast(any &&operand) }// namespace sled #endif /* ANY_H */ #endif /* SLED_ANY_H */
include/sled/buffer.h +4 −3 Original line number Diff line number Diff line Loading @@ -4,8 +4,9 @@ * @license : MIT **/ #ifndef BUFFER_H #define BUFFER_H #pragma once #ifndef SLED_BUFFER_H #define SLED_BUFFER_H #include <cstring> #include <memory> #include <stdint.h> Loading Loading @@ -275,4 +276,4 @@ using ZeroOnFreeBuffer = BufferT<T, true>; }// namespace sled #endif// BUFFER_H #endif// SLED_BUFFER_H
include/sled/byte_order.h +5 −0 Original line number Diff line number Diff line #progam once #ifndef SLED_BYTE_ORDER_H #define SLED_BYTE_ORDER_H #include <arpa/inet.h> #if defined(__APPLE__) Loading Loading @@ -48,3 +51,5 @@ NetworkToHost32(uint32_t n) { return be32toh(n); } #endif // SLED_BYTE_ORDER_H
include/sled/cleanup.h +4 −3 Original line number Diff line number Diff line Loading @@ -4,8 +4,9 @@ * @license : MIT **/ #ifndef CLEANUP_H #define CLEANUP_H #pragma once #ifndef SLED_CLEANUP_H #define SLED_CLEANUP_H #include "sled/optional.h" Loading Loading @@ -64,4 +65,4 @@ MakeCleanup(Callback callback) }// namespace sled #endif// CLEANUP_H #endif// SLED_CLEANUP_H