From 39ffae94c5bcaad46b043a68dd972283b9c2fb20 Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Mon, 30 Jan 2017 11:41:20 +0100 Subject: [PATCH] Use #pragma once --- benchmarks/commons/benchmark_tools.h | 5 +---- examples/3d_mesh.h | 5 +---- src/3rdparty/base64/b64.h | 5 +---- src/3rdparty/miloyip_itoa/branchlut.h | 5 +---- src/gmio_amf/amf_document.h | 4 +--- src/gmio_amf/amf_error.h | 4 +--- src/gmio_amf/amf_global.h | 4 +--- src/gmio_amf/amf_io.h | 4 +--- src/gmio_amf/amf_io_options.h | 4 +--- src/gmio_core/config.h.cmake | 5 +---- src/gmio_core/endian.h | 4 +--- src/gmio_core/error.h | 4 +--- src/gmio_core/global.h | 4 +--- src/gmio_core/internal/byte_codec.h | 5 +---- src/gmio_core/internal/byte_swap.h | 5 +---- src/gmio_core/internal/c99_math_compat.h | 7 ++----- src/gmio_core/internal/c99_stdio_compat.h | 5 +---- src/gmio_core/internal/c99_stdlib_compat.h | 5 +---- src/gmio_core/internal/const_string.h | 6 +----- src/gmio_core/internal/convert.h | 5 +---- src/gmio_core/internal/error_check.h | 5 +---- src/gmio_core/internal/fast_atof.h | 5 +---- src/gmio_core/internal/file_utils.h | 5 +---- src/gmio_core/internal/float_format_utils.h | 6 ++---- src/gmio_core/internal/google_doubleconversion.h | 7 +++---- src/gmio_core/internal/helper_memblock.h | 6 +----- src/gmio_core/internal/helper_stream.h | 5 +---- src/gmio_core/internal/helper_task_iface.h | 6 +----- src/gmio_core/internal/itoa.h | 5 +---- src/gmio_core/internal/locale_utils.h | 2 ++ src/gmio_core/internal/min_max.h | 5 +---- src/gmio_core/internal/numeric_utils.h | 6 +----- src/gmio_core/internal/ostringstream.h | 5 +---- src/gmio_core/internal/safe_cast.h | 5 +---- src/gmio_core/internal/string.h | 6 +----- src/gmio_core/internal/string_ascii_utils.h | 6 +----- src/gmio_core/internal/stringstream.h | 5 +---- src/gmio_core/internal/stringstream_fast_atof.h | 5 +---- src/gmio_core/internal/vecgeom_utils.h | 5 +---- src/gmio_core/internal/zip_utils.h | 6 +----- src/gmio_core/internal/zlib_utils.h | 5 +---- src/gmio_core/memblock.h | 5 +---- src/gmio_core/stream.h | 4 +--- src/gmio_core/streampos.h | 4 +--- src/gmio_core/task_iface.h | 4 +--- src/gmio_core/text_format.h | 6 +----- src/gmio_core/vecgeom.h | 4 +--- src/gmio_core/version.h.cmake | 14 ++++++-------- src/gmio_core/zlib_compress.h | 4 +--- src/gmio_stl/internal/helper_stl_mesh_creator.h | 5 +---- src/gmio_stl/internal/stl_error_check.h | 5 +---- src/gmio_stl/internal/stl_funptr_typedefs.h | 6 +----- src/gmio_stl/internal/stla_infos_probe.h | 5 +---- src/gmio_stl/internal/stla_parsing.h | 5 +---- src/gmio_stl/internal/stla_write.h | 5 +---- src/gmio_stl/internal/stlb_byte_swap.h | 5 +---- src/gmio_stl/internal/stlb_infos_probe.h | 5 +---- src/gmio_stl/internal/stlb_write.h | 5 +---- src/gmio_stl/stl_constants.h | 4 +--- src/gmio_stl/stl_error.h | 4 +--- src/gmio_stl/stl_format.h | 4 +--- src/gmio_stl/stl_global.h | 4 +--- src/gmio_stl/stl_infos.h | 4 +--- src/gmio_stl/stl_io.h | 4 +--- src/gmio_stl/stl_io_options.h | 4 +--- src/gmio_stl/stl_mesh.h | 4 +--- src/gmio_stl/stl_mesh_creator.h | 4 +--- src/gmio_stl/stl_triangle.h | 4 +--- src/gmio_stl/stlb_header.h | 4 +--- src/gmio_support/stl_occ_brep.h | 4 +--- src/gmio_support/stl_occ_mesh.h | 4 +--- src/gmio_support/stl_occ_meshvs.h | 4 +--- src/gmio_support/stl_occ_utils.h | 5 +---- src/gmio_support/stream_cpp.h | 5 +---- src/gmio_support/stream_qt.h | 4 +--- src/gmio_support/support_global.h | 4 +--- tests/core_utils.h | 6 +----- tests/stl_testcases.h | 5 +---- tests/stl_utils.h | 5 +---- tests/stream_buffer.h | 5 +---- 80 files changed, 90 insertions(+), 302 deletions(-) diff --git a/benchmarks/commons/benchmark_tools.h b/benchmarks/commons/benchmark_tools.h index f3f7ebb..3e73008 100644 --- a/benchmarks/commons/benchmark_tools.h +++ b/benchmarks/commons/benchmark_tools.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef BENCHMARK_TOOLS_H -#define BENCHMARK_TOOLS_H +#pragma once #include "../../src/gmio_core/global.h" #include @@ -117,5 +116,3 @@ void benchmark_print_results( struct benchmark_cmp_result_array result_array); GMIO_C_LINKAGE_END - -#endif /* BENCHMARK_TOOLS_H */ diff --git a/examples/3d_mesh.h b/examples/3d_mesh.h index dd4d676..4a29bd9 100644 --- a/examples/3d_mesh.h +++ b/examples/3d_mesh.h @@ -1,5 +1,4 @@ -#ifndef GMIO_EXAMPLES_3D_MESH_H -#define GMIO_EXAMPLES_3D_MESH_H +#pragma once #include @@ -22,5 +21,3 @@ struct my_3d_mesh size_t triangle_array_count; size_t triangle_array_capacity; }; - -#endif /* GMIO_EXAMPLES_3D_MESH_H */ diff --git a/src/3rdparty/base64/b64.h b/src/3rdparty/base64/b64.h index f29fb2d..f8bab1f 100644 --- a/src/3rdparty/base64/b64.h +++ b/src/3rdparty/base64/b64.h @@ -1,9 +1,6 @@ -#ifndef BASE64_B64_H -#define BASE64_B64_H +#pragma once #include void b64_encodeblock(const unsigned char* in, unsigned char* out, size_t len); void b64_decodeblock(const unsigned char* in, unsigned char* out); - -#endif /* BASE64_B64_H */ diff --git a/src/3rdparty/miloyip_itoa/branchlut.h b/src/3rdparty/miloyip_itoa/branchlut.h index dabe51d..ee350eb 100644 --- a/src/3rdparty/miloyip_itoa/branchlut.h +++ b/src/3rdparty/miloyip_itoa/branchlut.h @@ -1,5 +1,4 @@ -#ifndef MILOYIP_ITOA_BRANCHLUT_H -#define MILOYIP_ITOA_BRANCHLUT_H +#pragma once #include "../../gmio_core/global.h" @@ -9,5 +8,3 @@ char* i32toa_branchlut(int32_t value, char* buffer); char* u64toa_branchlut(uint64_t value, char* buffer); char* i64toa_branchlut(int64_t value, char* buffer); #endif - -#endif /* MILOYIP_ITOA_BRANCHLUT_H */ diff --git a/src/gmio_amf/amf_document.h b/src/gmio_amf/amf_document.h index f4caa2c..41c1c11 100644 --- a/src/gmio_amf/amf_document.h +++ b/src/gmio_amf/amf_document.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_AMF_DOCUMENT_H -#define GMIO_AMF_DOCUMENT_H +#pragma once #include "amf_global.h" @@ -376,5 +375,4 @@ struct gmio_amf_document struct gmio_amf_metadata* ptr_metadata); }; -#endif /* GMIO_AMF_DOCUMENT_H */ /*! @} */ diff --git a/src/gmio_amf/amf_error.h b/src/gmio_amf/amf_error.h index b423322..0bb4d5c 100644 --- a/src/gmio_amf/amf_error.h +++ b/src/gmio_amf/amf_error.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_AMF_ERROR_H -#define GMIO_AMF_ERROR_H +#pragma once /*! \c GMIO_AMF_ERROR_TAG * Byte-mask to tag(identify) AMF-specific error codes */ @@ -83,5 +82,4 @@ enum gmio_amf_error GMIO_AMF_ERROR_NULL_FUNC_GET_OBJECT_MESH_VOLUME_METADATA }; -#endif /* GMIO_AMF_ERROR_H */ /*! @} */ diff --git a/src/gmio_amf/amf_global.h b/src/gmio_amf/amf_global.h index 41b76ac..8012d6a 100644 --- a/src/gmio_amf/amf_global.h +++ b/src/gmio_amf/amf_global.h @@ -57,10 +57,8 @@ * @{ */ -#ifndef GMIO_AMF_GLOBAL_H -#define GMIO_AMF_GLOBAL_H +#pragma once #include "../gmio_core/global.h" -#endif /* GMIO_AMF_GLOBAL_H */ /*! @} */ diff --git a/src/gmio_amf/amf_io.h b/src/gmio_amf/amf_io.h index 4285aab..4743db0 100644 --- a/src/gmio_amf/amf_io.h +++ b/src/gmio_amf/amf_io.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_AMF_IO_H -#define GMIO_AMF_IO_H +#pragma once #include "amf_global.h" #include "amf_document.h" @@ -81,5 +80,4 @@ GMIO_API int gmio_amf_write_file( GMIO_C_LINKAGE_END -#endif /* GMIO_AMF_IO_H */ /*! @} */ diff --git a/src/gmio_amf/amf_io_options.h b/src/gmio_amf/amf_io_options.h index 9b66381..22be27d 100644 --- a/src/gmio_amf/amf_io_options.h +++ b/src/gmio_amf/amf_io_options.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_AMF_IO_OPTIONS_H -#define GMIO_AMF_IO_OPTIONS_H +#pragma once #include "amf_global.h" #include "../gmio_core/memblock.h" @@ -89,5 +88,4 @@ struct gmio_amf_write_options struct gmio_zlib_compress_options z_compress_options; }; -#endif /* GMIO_AMF_IO_OPTIONS_H */ /*! @} */ diff --git a/src/gmio_core/config.h.cmake b/src/gmio_core/config.h.cmake index 61a1ba4..f8aa24d 100644 --- a/src/gmio_core/config.h.cmake +++ b/src/gmio_core/config.h.cmake @@ -29,8 +29,7 @@ /* Generated by CMake */ -#ifndef GMIO_CONFIG_H_CMAKE -#define GMIO_CONFIG_H_CMAKE +#pragma once /* Build type */ #cmakedefine GMIO_DEBUG_BUILD @@ -107,5 +106,3 @@ /* Header: gmio_core/internal/string_ascii_utils.h */ /*#define GMIO_STRING_ASCII_UTILS_CTYPE_H*/ - -#endif /* GMIO_CONFIG_H_CMAKE */ diff --git a/src/gmio_core/endian.h b/src/gmio_core/endian.h index 666e8d4..aa25b52 100644 --- a/src/gmio_core/endian.h +++ b/src/gmio_core/endian.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_ENDIAN_H -#define GMIO_ENDIAN_H +#pragma once #include "global.h" @@ -72,5 +71,4 @@ GMIO_API enum gmio_endianness gmio_host_endianness(); GMIO_C_LINKAGE_END -#endif /* GMIO_ENDIAN_H */ /*! @} */ diff --git a/src/gmio_core/error.h b/src/gmio_core/error.h index e7be2f8..b74f7ad 100644 --- a/src/gmio_core/error.h +++ b/src/gmio_core/error.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_ERROR_H -#define GMIO_ERROR_H +#pragma once #include "global.h" @@ -129,5 +128,4 @@ GMIO_INLINE bool gmio_no_error(int code) GMIO_INLINE bool gmio_error(int code) { return code != GMIO_ERROR_OK ? true : false; } -#endif /* GMIO_ERROR_H */ /*! @} */ diff --git a/src/gmio_core/global.h b/src/gmio_core/global.h index b8e3e35..bdb7b41 100644 --- a/src/gmio_core/global.h +++ b/src/gmio_core/global.h @@ -38,8 +38,7 @@ * @{ */ -#ifndef GMIO_GLOBAL_H -#define GMIO_GLOBAL_H +#pragma once /* "config.h" is generated by cmake, it should reside in the out-of-source * build dir. @@ -237,5 +236,4 @@ enum gmio_bool_value /*! Expands to the size(item count) of an array */ #define GMIO_ARRAY_SIZE(array) sizeof(array) / sizeof(*array) -#endif /* GMIO_GLOBAL_H */ /*! @} */ diff --git a/src/gmio_core/internal/byte_codec.h b/src/gmio_core/internal/byte_codec.h index 3701d91..2d7fa2d 100644 --- a/src/gmio_core/internal/byte_codec.h +++ b/src/gmio_core/internal/byte_codec.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_BYTE_CODEC_H -#define GMIO_INTERNAL_BYTE_CODEC_H +#pragma once #include "../global.h" @@ -275,5 +274,3 @@ void gmio_adv_encode_uint64_be(uint64_t val, uint8_t** bytes) } #endif /* GMIO_HAVE_INT64_TYPE */ - -#endif /* GMIO_INTERNAL_BYTE_CODEC_H */ diff --git a/src/gmio_core/internal/byte_swap.h b/src/gmio_core/internal/byte_swap.h index 4f06d3d..bde0c95 100644 --- a/src/gmio_core/internal/byte_swap.h +++ b/src/gmio_core/internal/byte_swap.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_BYTE_SWAP_H -#define GMIO_INTERNAL_BYTE_SWAP_H +#pragma once #include "../global.h" @@ -64,5 +63,3 @@ GMIO_INLINE uint32_t gmio_uint32_bswap(uint32_t val) | ((val >> 24) & 0x000000FF); #endif } - -#endif /* GMIO_INTERNAL_BYTE_SWAP_H */ diff --git a/src/gmio_core/internal/c99_math_compat.h b/src/gmio_core/internal/c99_math_compat.h index ccc5be6..dcd8623 100644 --- a/src/gmio_core/internal/c99_math_compat.h +++ b/src/gmio_core/internal/c99_math_compat.h @@ -27,10 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_C99_MATH_COMPAT_H -#define GMIO_INTERNAL_C99_MATH_COMPAT_H -#include "../global.h" +#pragma once +#include "../global.h" #include #ifdef GMIO_HAVE_POWF_FUNC @@ -68,5 +67,3 @@ GMIO_INLINE float gmio_sqrtf(float x) /* No isnan() symbol */ # define gmio_isnan(x) ((x) == NAN) #endif - -#endif /* GMIO_INTERNAL_C99_MATH_COMPAT_H */ diff --git a/src/gmio_core/internal/c99_stdio_compat.h b/src/gmio_core/internal/c99_stdio_compat.h index 429bb53..ab33602 100644 --- a/src/gmio_core/internal/c99_stdio_compat.h +++ b/src/gmio_core/internal/c99_stdio_compat.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_C99_STDIO_COMPAT_H -#define GMIO_INTERNAL_C99_STDIO_COMPAT_H +#pragma once #include "../global.h" @@ -78,5 +77,3 @@ GMIO_INLINE int gmio_snprintf(char* buf, size_t bufn, const char* fmt, ...) return ret; } #endif - -#endif /* GMIO_INTERNAL_C99_STDIO_COMPAT_H */ diff --git a/src/gmio_core/internal/c99_stdlib_compat.h b/src/gmio_core/internal/c99_stdlib_compat.h index ae30059..c2ed1ed 100644 --- a/src/gmio_core/internal/c99_stdlib_compat.h +++ b/src/gmio_core/internal/c99_stdlib_compat.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_C99_STDLIB_COMPAT_H -#define GMIO_INTERNAL_C99_STDLIB_COMPAT_H +#pragma once #include "../global.h" @@ -41,5 +40,3 @@ GMIO_INLINE float gmio_strtof(const char* str, char** endptr) { return (float)strtod(str, endptr); } #endif - -#endif /* GMIO_INTERNAL_C99_STDLIB_COMPAT_H */ diff --git a/src/gmio_core/internal/const_string.h b/src/gmio_core/internal/const_string.h index 12ddf75..3a2a1e1 100644 --- a/src/gmio_core/internal/const_string.h +++ b/src/gmio_core/internal/const_string.h @@ -27,11 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_CONST_STRING_H -#define GMIO_INTERNAL_CONST_STRING_H +#pragma once #include "../global.h" - #include /*! Stores a read-only string of 8-bit chars. @@ -82,5 +80,3 @@ bool gmio_const_string_is_empty(const struct gmio_const_string* str) { return str->ptr == NULL || str->len == 0; } - -#endif /* GMIO_INTERNAL_CONST_STRING_H */ diff --git a/src/gmio_core/internal/convert.h b/src/gmio_core/internal/convert.h index 11b6f15..61c66ef 100644 --- a/src/gmio_core/internal/convert.h +++ b/src/gmio_core/internal/convert.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_CONVERT_H -#define GMIO_INTERNAL_CONVERT_H +#pragma once #include "../global.h" @@ -71,5 +70,3 @@ GMIO_INLINE int32_t gmio_convert_int32(float val) conv.as_float32 = val; return conv.as_int32; } - -#endif /* GMIO_INTERNAL_CONVERT_H */ diff --git a/src/gmio_core/internal/error_check.h b/src/gmio_core/internal/error_check.h index 80cd8ed..abb53e6 100644 --- a/src/gmio_core/internal/error_check.h +++ b/src/gmio_core/internal/error_check.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_ERROR_CHECK_H -#define GMIO_INTERNAL_ERROR_CHECK_H +#pragma once #include "../global.h" #include @@ -42,5 +41,3 @@ bool gmio_check_memblock_size( /*! Checks gmio_lc_numeric_is_C(), if false sets \p *error to * \c GMIO_ERROR_BAD_LC_NUMERIC*/ bool gmio_check_lc_numeric(int* error); - -#endif /* GMIO_INTERNAL_ERROR_CHECK_H */ diff --git a/src/gmio_core/internal/fast_atof.h b/src/gmio_core/internal/fast_atof.h index f67329e..bc690ac 100644 --- a/src/gmio_core/internal/fast_atof.h +++ b/src/gmio_core/internal/fast_atof.h @@ -6,8 +6,7 @@ /* Adapted to ISO-C90 */ -#ifndef GMIO_INTERNAL_FAST_ATOF_H -#define GMIO_INTERNAL_FAST_ATOF_H +#pragma once #include "../global.h" #include "c99_math_compat.h" @@ -406,5 +405,3 @@ GMIO_INLINE float fast_atof(const char* str) return ret; } #endif - -#endif /* GMIO_INTERNAL_FAST_ATOF_H */ diff --git a/src/gmio_core/internal/file_utils.h b/src/gmio_core/internal/file_utils.h index 506d2a3..70b9236 100644 --- a/src/gmio_core/internal/file_utils.h +++ b/src/gmio_core/internal/file_utils.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_FILE_UTILS_H -#define GMIO_INTERNAL_FILE_UTILS_H +#pragma once #include "const_string.h" @@ -36,5 +35,3 @@ * The base name consists of all characters in the file up to (but not including) * the last '.' character. */ struct gmio_const_string gmio_fileutils_find_basefilename(const char* filepath); - -#endif /* GMIO_INTERNAL_FILE_UTILS_H */ diff --git a/src/gmio_core/internal/float_format_utils.h b/src/gmio_core/internal/float_format_utils.h index 1627624..899a7a9 100644 --- a/src/gmio_core/internal/float_format_utils.h +++ b/src/gmio_core/internal/float_format_utils.h @@ -27,9 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_FLOAT_FORMAT_UTILS_H -#define GMIO_INTERNAL_FLOAT_FORMAT_UTILS_H +#pragma once +#include "../global.h" #include "../text_format.h" char gmio_float_text_format_to_stdio_specifier( @@ -41,5 +41,3 @@ char* gmio_write_stdio_float_format( struct gmio_string_16 { char array[16]; }; struct gmio_string_16 gmio_to_stdio_float_format( enum gmio_float_text_format format, uint8_t prec); - -#endif /* GMIO_INTERNAL_FLOAT_FORMAT_UTILS_H */ diff --git a/src/gmio_core/internal/google_doubleconversion.h b/src/gmio_core/internal/google_doubleconversion.h index 482b335..106c058 100644 --- a/src/gmio_core/internal/google_doubleconversion.h +++ b/src/gmio_core/internal/google_doubleconversion.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_GOOGLE_DOUBLECONVERSION_H -#define GMIO_INTERNAL_GOOGLE_DOUBLECONVERSION_H +#pragma once #include "../global.h" #include "../text_format.h" @@ -41,6 +40,7 @@ */ GMIO_C_LINKAGE_BEGIN + float gmio_str2float_googledoubleconversion(const char* num, size_t numlen); double gmio_str2double_googledoubleconversion(const char* num, size_t numlen); @@ -56,6 +56,5 @@ int gmio_double2str_googledoubleconversion( size_t bufflen, enum gmio_float_text_format textformat, uint8_t prec); -GMIO_C_LINKAGE_END -#endif /* GMIO_INTERNAL_GOOGLE_DOUBLECONVERSION_H */ +GMIO_C_LINKAGE_END diff --git a/src/gmio_core/internal/helper_memblock.h b/src/gmio_core/internal/helper_memblock.h index fcd850a..37c87b7 100644 --- a/src/gmio_core/internal/helper_memblock.h +++ b/src/gmio_core/internal/helper_memblock.h @@ -27,11 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_HELPER_MEMBLOCK_H -#define GMIO_INTERNAL_HELPER_MEMBLOCK_H +#pragma once #include "../memblock.h" - #include struct gmio_memblock_helper @@ -76,5 +74,3 @@ void gmio_memblock_helper_release(struct gmio_memblock_helper* helper) helper->was_allocated = false; } } - -#endif /* GMIO_INTERNAL_HELPER_MEMBLOCK_H */ diff --git a/src/gmio_core/internal/helper_stream.h b/src/gmio_core/internal/helper_stream.h index b7c06e8..2d14fd7 100644 --- a/src/gmio_core/internal/helper_stream.h +++ b/src/gmio_core/internal/helper_stream.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_HELPER_STREAM_H -#define GMIO_INTERNAL_HELPER_STREAM_H +#pragma once #include "../stream.h" @@ -152,5 +151,3 @@ int gmio_stream_set_pos( return stream->func_set_pos(stream->cookie, pos); return -1; } - -#endif /* GMIO_INTERNAL_HELPER_STREAM_H */ diff --git a/src/gmio_core/internal/helper_task_iface.h b/src/gmio_core/internal/helper_task_iface.h index e0c5b05..3c4f348 100644 --- a/src/gmio_core/internal/helper_task_iface.h +++ b/src/gmio_core/internal/helper_task_iface.h @@ -27,11 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_HELPER_TASK_IFACE_H -#define GMIO_INTERNAL_HELPER_TASK_IFACE_H +#pragma once #include "../task_iface.h" - #include /*! Safe and convenient function for gmio_task_iface::func_is_stop_requested() */ @@ -50,5 +48,3 @@ GMIO_INLINE void gmio_task_iface_handle_progress( if (itask != NULL && itask->func_handle_progress != NULL) itask->func_handle_progress(itask->cookie, value, max_value); } - -#endif /* GMIO_INTERNAL_HELPER_TASK_IFACE_H */ diff --git a/src/gmio_core/internal/itoa.h b/src/gmio_core/internal/itoa.h index cda7099..0dd957c 100644 --- a/src/gmio_core/internal/itoa.h +++ b/src/gmio_core/internal/itoa.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_ITOA_H -#define GMIO_INTERNAL_ITOA_H +#pragma once #include "../global.h" @@ -72,5 +71,3 @@ char* gmio_i64toa(int64_t value, char* str) return i64toa_branchlut(value, str); } #endif /* GMIO_HAVE_INT64_TYPE */ - -#endif /* GMIO_INTERNAL_ITOA_H */ diff --git a/src/gmio_core/internal/locale_utils.h b/src/gmio_core/internal/locale_utils.h index c233b00..b198e59 100644 --- a/src/gmio_core/internal/locale_utils.h +++ b/src/gmio_core/internal/locale_utils.h @@ -27,6 +27,8 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ +#pragma once + #include "../global.h" const char* gmio_lc_numeric(); diff --git a/src/gmio_core/internal/min_max.h b/src/gmio_core/internal/min_max.h index 2323242..06c4060 100644 --- a/src/gmio_core/internal/min_max.h +++ b/src/gmio_core/internal/min_max.h @@ -27,10 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_MIN_MAX_H -#define GMIO_INTERNAL_MIN_MAX_H +#pragma once #define GMIO_MIN(v1, v2) ((v1) < (v2) ? (v1) : (v2)) #define GMIO_MAX(v1, v2) ((v1) > (v2) ? (v1) : (v2)) - -#endif /* GMIO_INTERNAL_MIN_MAX_H */ diff --git a/src/gmio_core/internal/numeric_utils.h b/src/gmio_core/internal/numeric_utils.h index 0853344..18facd1 100644 --- a/src/gmio_core/internal/numeric_utils.h +++ b/src/gmio_core/internal/numeric_utils.h @@ -27,12 +27,10 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_NUMERIC_UTILS_H -#define GMIO_INTERNAL_NUMERIC_UTILS_H +#pragma once #include "../global.h" #include "convert.h" - #include /*! Does \p a and \p b compares equals by ULP (Units in the Last Place) ? @@ -75,5 +73,3 @@ int gmio_float32_sign(float v) { return gmio_int32_sign(gmio_convert_int32(v)); } - -#endif /* GMIO_INTERNAL_NUMERIC_UTILS_H */ diff --git a/src/gmio_core/internal/ostringstream.h b/src/gmio_core/internal/ostringstream.h index b4fa159..5e2cf84 100644 --- a/src/gmio_core/internal/ostringstream.h +++ b/src/gmio_core/internal/ostringstream.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_OSTRINGSTREAM_H -#define GMIO_INTERNAL_OSTRINGSTREAM_H +#pragma once #include "../global.h" #include "../stream.h" @@ -176,5 +175,3 @@ void gmio_ostringstream_write_xmlcdata_close(struct gmio_ostringstream *sstream) { gmio_ostringstream_write_chararray(sstream, "]]>"); } - -#endif /* GMIO_INTERNAL_OSTRINGSTREAM_H */ diff --git a/src/gmio_core/internal/safe_cast.h b/src/gmio_core/internal/safe_cast.h index aca1e3c..f7a5240 100644 --- a/src/gmio_core/internal/safe_cast.h +++ b/src/gmio_core/internal/safe_cast.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_SAFE_CAST_H -#define GMIO_INTERNAL_SAFE_CAST_H +#pragma once #include "../global.h" #include "../stream.h" @@ -61,5 +60,3 @@ GMIO_INLINE size_t gmio_streamsize_to_size(gmio_streamsize_t val) return (size_t)val; #endif } - -#endif /* GMIO_INTERNAL_SAFE_CAST_H */ diff --git a/src/gmio_core/internal/string.h b/src/gmio_core/internal/string.h index 129e19b..3babbc1 100644 --- a/src/gmio_core/internal/string.h +++ b/src/gmio_core/internal/string.h @@ -27,11 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STRING_H -#define GMIO_INTERNAL_STRING_H +#pragma once #include "../global.h" - #include /*! Stores a mutable string of chars. @@ -109,5 +107,3 @@ char* gmio_cstr_copy( } return dst + copy_len; } - -#endif /* GMIO_INTERNAL_STRING_H */ diff --git a/src/gmio_core/internal/string_ascii_utils.h b/src/gmio_core/internal/string_ascii_utils.h index ecc3a19..8dba68b 100644 --- a/src/gmio_core/internal/string_ascii_utils.h +++ b/src/gmio_core/internal/string_ascii_utils.h @@ -27,11 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STRING_ASCII_UTILS_H -#define GMIO_INTERNAL_STRING_ASCII_UTILS_H +#pragma once #include "../global.h" - #include /*! Returns non-zero if \p c is a space, zero otherwise */ @@ -207,5 +205,3 @@ bool gmio_ascii_istarts_with(const char* str, const char* begin) } return true; } - -#endif /* GMIO_INTERNAL_STRING_ASCII_UTILS_H */ diff --git a/src/gmio_core/internal/stringstream.h b/src/gmio_core/internal/stringstream.h index 3409332..5462959 100644 --- a/src/gmio_core/internal/stringstream.h +++ b/src/gmio_core/internal/stringstream.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STRINGSTREAM_H -#define GMIO_INTERNAL_STRINGSTREAM_H +#pragma once #include "../global.h" #include "../stream.h" @@ -254,5 +253,3 @@ float gmio_stringstream_parse_float32(struct gmio_stringstream* sstream) return gmio_str2float_googledoubleconversion(num, strnum.len); #endif } - -#endif /* GMIO_INTERNAL_STRINGSTREAM_H */ diff --git a/src/gmio_core/internal/stringstream_fast_atof.h b/src/gmio_core/internal/stringstream_fast_atof.h index f01d481..4d16441 100644 --- a/src/gmio_core/internal/stringstream_fast_atof.h +++ b/src/gmio_core/internal/stringstream_fast_atof.h @@ -6,8 +6,7 @@ /* Adapted to ISO-C90 */ -#ifndef GMIO_INTERNAL_STRINGSTREAM_FAST_ATOF_H -#define GMIO_INTERNAL_STRINGSTREAM_FAST_ATOF_H +#pragma once #include "fast_atof.h" #include "c99_math_compat.h" @@ -110,5 +109,3 @@ GMIO_INLINE float gmio_stringstream_fast_atof(struct gmio_stringstream* sstream) } return negative ? -value : value; } - -#endif /* GMIO_INTERNAL_STRINGSTREAM_FAST_ATOF_H */ diff --git a/src/gmio_core/internal/vecgeom_utils.h b/src/gmio_core/internal/vecgeom_utils.h index 618ce29..d7abd0a 100644 --- a/src/gmio_core/internal/vecgeom_utils.h +++ b/src/gmio_core/internal/vecgeom_utils.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_VECGEOM_UTILS_H -#define GMIO_INTERNAL_VECGEOM_UTILS_H +#pragma once #include "../global.h" @@ -120,5 +119,3 @@ void gmio_vec3d_normalize(struct gmio_vec3d* v) v->z /= d; } } - -#endif /* GMIO_INTERNAL_VECGEOM_UTILS_H */ diff --git a/src/gmio_core/internal/zip_utils.h b/src/gmio_core/internal/zip_utils.h index d10e132..b64914a 100644 --- a/src/gmio_core/internal/zip_utils.h +++ b/src/gmio_core/internal/zip_utils.h @@ -27,11 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_ZIP_UTILS_H -#define GMIO_INTERNAL_ZIP_UTILS_H +#pragma once #include "../global.h" - #include "../stream.h" #include @@ -351,5 +349,3 @@ bool gmio_zip_write_single_file( struct gmio_stream* stream, const struct gmio_zip_file_entry* file_entry, int* ptr_error); - -#endif /* GMIO_INTERNAL_ZIP_UTILS_H */ diff --git a/src/gmio_core/internal/zlib_utils.h b/src/gmio_core/internal/zlib_utils.h index 3978eb6..9894d78 100644 --- a/src/gmio_core/internal/zlib_utils.h +++ b/src/gmio_core/internal/zlib_utils.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_ZLIB_UTILS_H -#define GMIO_INTERNAL_ZLIB_UTILS_H +#pragma once #include "../global.h" #include "../zlib_compress.h" @@ -63,5 +62,3 @@ uint32_t gmio_zlib_crc32_initial(); /*! Updates a running CRC-32 with the bytes from \p buff */ uint32_t gmio_zlib_crc32_update( uint32_t crc, const uint8_t* buff, size_t buff_len); - -#endif /* GMIO_INTERNAL_ZLIB_UTILS_H */ diff --git a/src/gmio_core/memblock.h b/src/gmio_core/memblock.h index 828ba89..3773e71 100644 --- a/src/gmio_core/memblock.h +++ b/src/gmio_core/memblock.h @@ -34,11 +34,9 @@ * @{ */ -#ifndef GMIO_MEMBLOCK_H -#define GMIO_MEMBLOCK_H +#pragma once #include "global.h" - #include /*! Basic memory block @@ -130,5 +128,4 @@ GMIO_API struct gmio_memblock gmio_memblock_default(); GMIO_C_LINKAGE_END -#endif /* GMIO_MEMBLOCK_H */ /*! @} */ diff --git a/src/gmio_core/stream.h b/src/gmio_core/stream.h index 8a89428..b838592 100644 --- a/src/gmio_core/stream.h +++ b/src/gmio_core/stream.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STREAM_H -#define GMIO_STREAM_H +#pragma once #include "global.h" #include "memblock.h" @@ -160,5 +159,4 @@ GMIO_API struct gmio_stream gmio_stream_stdio(FILE* file); GMIO_C_LINKAGE_END -#endif /* GMIO_STREAM_H */ /*! @} */ diff --git a/src/gmio_core/streampos.h b/src/gmio_core/streampos.h index 7f0fe84..31818f7 100644 --- a/src/gmio_core/streampos.h +++ b/src/gmio_core/streampos.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STREAMPOS_H -#define GMIO_STREAMPOS_H +#pragma once #include "global.h" @@ -58,5 +57,4 @@ struct gmio_streampos uint8_t cookie[GMIO_STREAMPOS_COOKIE_SIZE]; }; -#endif /* GMIO_STREAMPOS_H */ /*! @} */ diff --git a/src/gmio_core/task_iface.h b/src/gmio_core/task_iface.h index 59ca80a..5620042 100644 --- a/src/gmio_core/task_iface.h +++ b/src/gmio_core/task_iface.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_TASK_IFACE_H -#define GMIO_TASK_IFACE_H +#pragma once #include "global.h" @@ -65,5 +64,4 @@ struct gmio_task_iface void* cookie, intmax_t value, intmax_t max_value); }; -#endif /* GMIO_TASK_IFACE_H */ /*! @} */ diff --git a/src/gmio_core/text_format.h b/src/gmio_core/text_format.h index eb1d1e8..94cb53b 100644 --- a/src/gmio_core/text_format.h +++ b/src/gmio_core/text_format.h @@ -34,10 +34,7 @@ * @{ */ -#ifndef GMIO_TEXT_FORMAT_H -#define GMIO_TEXT_FORMAT_H - -#include "global.h" +#pragma once /*! Various formats to textually represent a float(single/double precision) */ enum gmio_float_text_format @@ -56,5 +53,4 @@ enum gmio_float_text_format GMIO_FLOAT_TEXT_FORMAT_SHORTEST_UPPERCASE }; -#endif /* GMIO_TEXT_FORMAT_H */ /*! @} */ diff --git a/src/gmio_core/vecgeom.h b/src/gmio_core/vecgeom.h index bc49538..667f379 100644 --- a/src/gmio_core/vecgeom.h +++ b/src/gmio_core/vecgeom.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_CORE_VECGEOM_H -#define GMIO_CORE_VECGEOM_H +#pragma once /*! Vector of three float coords */ struct gmio_vec3f @@ -53,5 +52,4 @@ struct gmio_vec3d double z; }; -#endif /* GMIO_CORE_VECGEOM_H */ /*! @} */ diff --git a/src/gmio_core/version.h.cmake b/src/gmio_core/version.h.cmake index d7ee2c2..3188bb3 100644 --- a/src/gmio_core/version.h.cmake +++ b/src/gmio_core/version.h.cmake @@ -29,13 +29,11 @@ /* Generated by CMake */ -#ifndef GMIO_VERSION_H_CMAKE -#define GMIO_VERSION_H_CMAKE +#pragma once -# define GMIO_VERSION_MAJOR @GMIO_VERSION_MAJOR@ -# define GMIO_VERSION_MINOR @GMIO_VERSION_MINOR@ -# define GMIO_VERSION_PATCH @GMIO_VERSION_PATCH@ -# define GMIO_VERSION_STR "@GMIO_VERSION@" -# define GMIO_VERSION 0x0@GMIO_VERSION_MAJOR@0@GMIO_VERSION_MINOR@0@GMIO_VERSION_PATCH@ +#define GMIO_VERSION_MAJOR @GMIO_VERSION_MAJOR@ +#define GMIO_VERSION_MINOR @GMIO_VERSION_MINOR@ +#define GMIO_VERSION_PATCH @GMIO_VERSION_PATCH@ +#define GMIO_VERSION_STR "@GMIO_VERSION@" +#define GMIO_VERSION 0x0@GMIO_VERSION_MAJOR@0@GMIO_VERSION_MINOR@0@GMIO_VERSION_PATCH@ -#endif /* GMIO_VERSION_H_CMAKE */ diff --git a/src/gmio_core/zlib_compress.h b/src/gmio_core/zlib_compress.h index 75a5589..baf72b3 100644 --- a/src/gmio_core/zlib_compress.h +++ b/src/gmio_core/zlib_compress.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_ZLIB_COMPRESS_H -#define GMIO_ZLIB_COMPRESS_H +#pragma once #include "global.h" @@ -97,5 +96,4 @@ struct gmio_zlib_compress_options void* opaque; }; -#endif /* GMIO_ZLIB_COMPRESS_H */ /*! @} */ diff --git a/src/gmio_stl/internal/helper_stl_mesh_creator.h b/src/gmio_stl/internal/helper_stl_mesh_creator.h index 79c4564..35611ca 100644 --- a/src/gmio_stl/internal/helper_stl_mesh_creator.h +++ b/src/gmio_stl/internal/helper_stl_mesh_creator.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_HELPER_STL_MESH_CREATOR_H -#define GMIO_INTERNAL_HELPER_STL_MESH_CREATOR_H +#pragma once #include "../stl_mesh_creator.h" @@ -61,5 +60,3 @@ GMIO_INLINE void gmio_stl_mesh_creator_end_solid( if (creator != NULL && creator->func_end_solid != NULL) creator->func_end_solid(creator->cookie); } - -#endif /* GMIO_INTERNAL_HELPER_STL_MESH_CREATOR_H */ diff --git a/src/gmio_stl/internal/stl_error_check.h b/src/gmio_stl/internal/stl_error_check.h index 1710808..e49e287 100644 --- a/src/gmio_stl/internal/stl_error_check.h +++ b/src/gmio_stl/internal/stl_error_check.h @@ -29,8 +29,7 @@ /* TODO : documentation */ -#ifndef GMIO_INTERNAL_STL_ERROR_CHECK_H -#define GMIO_INTERNAL_STL_ERROR_CHECK_H +#pragma once #include "../../gmio_core/global.h" #include "../../gmio_core/endian.h" @@ -40,5 +39,3 @@ struct gmio_stl_mesh; bool gmio_stl_check_mesh(int* error, const struct gmio_stl_mesh* mesh); bool gmio_stla_check_float32_precision(int* error, uint8_t prec); bool gmio_stlb_check_byteorder(int* error, enum gmio_endianness byte_order); - -#endif /* GMIO_INTERNAL_STL_ERROR_CHECK_H */ diff --git a/src/gmio_stl/internal/stl_funptr_typedefs.h b/src/gmio_stl/internal/stl_funptr_typedefs.h index d7ce6c6..4cc710b 100644 --- a/src/gmio_stl/internal/stl_funptr_typedefs.h +++ b/src/gmio_stl/internal/stl_funptr_typedefs.h @@ -27,11 +27,9 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STL_FUNPTR_TYPEDEFS_H -#define GMIO_INTERNAL_STL_FUNPTR_TYPEDEFS_H +#pragma once #include - #include "../stl_mesh.h" #include "../stl_mesh_creator.h" @@ -50,5 +48,3 @@ typedef void (*gmio_stl_mesh_creator_func_binary_begin_solid_t)( typedef void (*gmio_stl_mesh_creator_func_add_triangle_t)( void*, uint32_t, const struct gmio_stl_triangle*); typedef void (*gmio_stl_mesh_creator_func_end_solid_t)(void*); - -#endif /* GMIO_INTERNAL_STL_FUNPTR_TYPEDEFS_H */ diff --git a/src/gmio_stl/internal/stla_infos_probe.h b/src/gmio_stl/internal/stla_infos_probe.h index b0400cb..e3372fb 100644 --- a/src/gmio_stl/internal/stla_infos_probe.h +++ b/src/gmio_stl/internal/stla_infos_probe.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLA_INFOS_PROBE_H -#define GMIO_INTERNAL_STLA_INFOS_PROBE_H +#pragma once #include "../stl_infos.h" @@ -38,5 +37,3 @@ int gmio_stla_infos_probe( struct gmio_stream* stream, unsigned flags, const struct gmio_stl_infos_probe_options* opts); - -#endif /* GMIO_INTERNAL_STLA_INFOS_PROBE_H */ diff --git a/src/gmio_stl/internal/stla_parsing.h b/src/gmio_stl/internal/stla_parsing.h index dc01950..4824105 100644 --- a/src/gmio_stl/internal/stla_parsing.h +++ b/src/gmio_stl/internal/stla_parsing.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLA_PARSING_H -#define GMIO_INTERNAL_STLA_PARSING_H +#pragma once #include "../../gmio_core/global.h" #include "../../gmio_core/stream.h" @@ -123,5 +122,3 @@ int gmio_stla_eat_next_token_inplace( */ int gmio_stla_eat_until_token( struct gmio_stla_parse_data* data, const enum gmio_stla_token* end_tokens); - -#endif /* GMIO_INTERNAL_STLA_PARSING_H */ diff --git a/src/gmio_stl/internal/stla_write.h b/src/gmio_stl/internal/stla_write.h index 4fa6cfd..abbc46b 100644 --- a/src/gmio_stl/internal/stla_write.h +++ b/src/gmio_stl/internal/stla_write.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLA_WRITE_H -#define GMIO_INTERNAL_STLA_WRITE_H +#pragma once #include "../../gmio_core/stream.h" #include "../stl_io_options.h" @@ -44,5 +43,3 @@ int gmio_stla_write( struct gmio_stream* stream, const struct gmio_stl_mesh* mesh, const struct gmio_stl_write_options* options); - -#endif /* GMIO_INTERNAL_STLA_WRITE_H */ diff --git a/src/gmio_stl/internal/stlb_byte_swap.h b/src/gmio_stl/internal/stlb_byte_swap.h index 3359182..9206350 100644 --- a/src/gmio_stl/internal/stlb_byte_swap.h +++ b/src/gmio_stl/internal/stlb_byte_swap.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLB_BYTE_SWAP_H -#define GMIO_INTERNAL_STLB_BYTE_SWAP_H +#pragma once #include "../../gmio_core/global.h" #include "../stl_triangle.h" @@ -39,5 +38,3 @@ * the "attribute byte count" member. */ void gmio_stl_triangle_bswap(struct gmio_stl_triangle* triangle); - -#endif /* GMIO_INTERNAL_STLB_BYTE_SWAP_H */ diff --git a/src/gmio_stl/internal/stlb_infos_probe.h b/src/gmio_stl/internal/stlb_infos_probe.h index 9fe9eb3..b0658d4 100644 --- a/src/gmio_stl/internal/stlb_infos_probe.h +++ b/src/gmio_stl/internal/stlb_infos_probe.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLB_INFOS_PROBE_H -#define GMIO_INTERNAL_STLB_INFOS_PROBE_H +#pragma once #include "../stl_infos.h" #include "../../gmio_core/endian.h" @@ -43,5 +42,3 @@ int gmio_stlb_infos_probe( /*! Returns the size(in bytes) of the whole STL binary data given some facet * count */ gmio_streamsize_t gmio_stlb_infos_size(uint32_t facet_count); - -#endif /* GMIO_INTERNAL_STLB_INFOS_PROBE_H */ diff --git a/src/gmio_stl/internal/stlb_write.h b/src/gmio_stl/internal/stlb_write.h index b65ce39..0336dd2 100644 --- a/src/gmio_stl/internal/stlb_write.h +++ b/src/gmio_stl/internal/stlb_write.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_INTERNAL_STLB_WRITE_H -#define GMIO_INTERNAL_STLB_WRITE_H +#pragma once #include "../../gmio_core/endian.h" #include "../../gmio_core/stream.h" @@ -46,5 +45,3 @@ int gmio_stlb_write( struct gmio_stream* stream, const struct gmio_stl_mesh* mesh, const struct gmio_stl_write_options* opts); - -#endif /* GMIO_INTERNAL_STLB_WRITE_H */ diff --git a/src/gmio_stl/stl_constants.h b/src/gmio_stl/stl_constants.h index 9b5fa6e..ea8d386 100644 --- a/src/gmio_stl/stl_constants.h +++ b/src/gmio_stl/stl_constants.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_CONSTANTS_H -#define GMIO_STL_CONSTANTS_H +#pragma once #include "../gmio_core/global.h" @@ -58,5 +57,4 @@ enum gmio_stl_constants GMIO_STLB_MIN_CONTENTS_SIZE = 284 }; -#endif /* GMIO_STL_CONSTANTS_H */ /*! @} */ diff --git a/src/gmio_stl/stl_error.h b/src/gmio_stl/stl_error.h index 38b3fc5..cecad72 100644 --- a/src/gmio_stl/stl_error.h +++ b/src/gmio_stl/stl_error.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_ERROR_H -#define GMIO_STL_ERROR_H +#pragma once /*! \c GMIO_STL_ERROR_TAG * Byte-mask to tag(identify) STL-specific error codes */ @@ -72,5 +71,4 @@ enum gmio_stl_error GMIO_STL_ERROR_FACET_COUNT = GMIO_STL_ERROR_TAG + 0x1002 }; -#endif /* GMIO_STL_ERROR_H */ /*! @} */ diff --git a/src/gmio_stl/stl_format.h b/src/gmio_stl/stl_format.h index 77d0626..ec551a7 100644 --- a/src/gmio_stl/stl_format.h +++ b/src/gmio_stl/stl_format.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_FORMAT_H -#define GMIO_STL_FORMAT_H +#pragma once #include "stl_global.h" #include "../gmio_core/stream.h" @@ -82,5 +81,4 @@ GMIO_API enum gmio_stl_format gmio_stl_format_probe_file(const char* filepath); GMIO_C_LINKAGE_END -#endif /* GMIO_STL_FORMAT_H */ /*! @} */ diff --git a/src/gmio_stl/stl_global.h b/src/gmio_stl/stl_global.h index 273a1c8..8dda2aa 100644 --- a/src/gmio_stl/stl_global.h +++ b/src/gmio_stl/stl_global.h @@ -105,10 +105,8 @@ * @{ */ -#ifndef GMIO_STL_GLOBAL_H -#define GMIO_STL_GLOBAL_H +#pragma once #include "../gmio_core/global.h" -#endif /* GMIO_STL_GLOBAL_H */ /*! @} */ diff --git a/src/gmio_stl/stl_infos.h b/src/gmio_stl/stl_infos.h index 682becf..d18cac9 100644 --- a/src/gmio_stl/stl_infos.h +++ b/src/gmio_stl/stl_infos.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_INFOS_H -#define GMIO_STL_INFOS_H +#pragma once #include "stl_global.h" #include "stl_format.h" @@ -168,5 +167,4 @@ GMIO_API gmio_streamsize_t gmio_stla_infos_probe_streamsize( GMIO_C_LINKAGE_END -#endif /* GMIO_STL_INFOS_H */ /*! @} */ diff --git a/src/gmio_stl/stl_io.h b/src/gmio_stl/stl_io.h index d8de585..aa205ee 100644 --- a/src/gmio_stl/stl_io.h +++ b/src/gmio_stl/stl_io.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_IO_H -#define GMIO_STL_IO_H +#pragma once #include "stl_global.h" @@ -184,5 +183,4 @@ GMIO_API int gmio_stlb_header_write( GMIO_C_LINKAGE_END -#endif /* GMIO_STL_IO_H */ /*! @} */ diff --git a/src/gmio_stl/stl_io_options.h b/src/gmio_stl/stl_io_options.h index 42936e8..d23dc31 100644 --- a/src/gmio_stl/stl_io_options.h +++ b/src/gmio_stl/stl_io_options.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_IO_OPTIONS_H -#define GMIO_STL_IO_OPTIONS_H +#pragma once #include "stl_global.h" #include "stlb_header.h" @@ -160,5 +159,4 @@ struct gmio_stl_write_options struct gmio_stlb_header stlb_header; }; -#endif /* GMIO_STL_IO_OPTIONS_H */ /*! @} */ diff --git a/src/gmio_stl/stl_mesh.h b/src/gmio_stl/stl_mesh.h index 7843e8d..6dd98ba 100644 --- a/src/gmio_stl/stl_mesh.h +++ b/src/gmio_stl/stl_mesh.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_MESH_H -#define GMIO_STL_MESH_H +#pragma once #include "stl_global.h" #include "stl_triangle.h" @@ -58,5 +57,4 @@ struct gmio_stl_mesh struct gmio_stl_triangle* triangle); }; -#endif /* GMIO_STL_MESH_H */ /*! @} */ diff --git a/src/gmio_stl/stl_mesh_creator.h b/src/gmio_stl/stl_mesh_creator.h index 132dcdd..d1702e0 100644 --- a/src/gmio_stl/stl_mesh_creator.h +++ b/src/gmio_stl/stl_mesh_creator.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_MESH_CREATOR_H -#define GMIO_STL_MESH_CREATOR_H +#pragma once #include "stl_global.h" #include "stl_format.h" @@ -115,5 +114,4 @@ struct gmio_stl_mesh_creator void (*func_end_solid)(void* cookie); }; -#endif /* GMIO_STL_MESH_CREATOR_H */ /*! @} */ diff --git a/src/gmio_stl/stl_triangle.h b/src/gmio_stl/stl_triangle.h index 5d83f36..3091df8 100644 --- a/src/gmio_stl/stl_triangle.h +++ b/src/gmio_stl/stl_triangle.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STL_TRIANGLE_H -#define GMIO_STL_TRIANGLE_H +#pragma once #include "stl_global.h" #include "../gmio_core/vecgeom.h" @@ -57,5 +56,4 @@ GMIO_API void gmio_stl_triangle_compute_normal(struct gmio_stl_triangle* tri); GMIO_C_LINKAGE_END -#endif /* GMIO_STL_TRIANGLE_H */ /*! @} */ diff --git a/src/gmio_stl/stlb_header.h b/src/gmio_stl/stlb_header.h index a146fbb..9b5709a 100644 --- a/src/gmio_stl/stlb_header.h +++ b/src/gmio_stl/stlb_header.h @@ -34,8 +34,7 @@ * @{ */ -#ifndef GMIO_STLB_HEADER_H -#define GMIO_STLB_HEADER_H +#pragma once #include "stl_global.h" #include "stl_constants.h" @@ -71,5 +70,4 @@ GMIO_API void gmio_stlb_header_to_printable_str( GMIO_C_LINKAGE_END -#endif /* GMIO_STLB_HEADER_H */ /*! @} */ diff --git a/src/gmio_support/stl_occ_brep.h b/src/gmio_support/stl_occ_brep.h index fefa9d3..9609e17 100644 --- a/src/gmio_support/stl_occ_brep.h +++ b/src/gmio_support/stl_occ_brep.h @@ -47,8 +47,7 @@ # error C++ compiler required #endif -#ifndef GMIO_SUPPORT_STL_OCC_BREP_H -#define GMIO_SUPPORT_STL_OCC_BREP_H +#pragma once #include "support_global.h" #include "../gmio_stl/stl_mesh.h" @@ -100,5 +99,4 @@ private: const TopoDS_Shape* m_shape; }; -#endif /* GMIO_SUPPORT_STL_OCC_BREP_H */ /*! @} */ diff --git a/src/gmio_support/stl_occ_mesh.h b/src/gmio_support/stl_occ_mesh.h index 71a5f0f..ddd7342 100644 --- a/src/gmio_support/stl_occ_mesh.h +++ b/src/gmio_support/stl_occ_mesh.h @@ -47,8 +47,7 @@ # error C++ compiler required #endif -#ifndef GMIO_SUPPORT_STL_OCC_MESH_H -#define GMIO_SUPPORT_STL_OCC_MESH_H +#pragma once #include "support_global.h" #include "../gmio_stl/stl_mesh.h" @@ -142,5 +141,4 @@ private: BRepBuilderAPI_VertexInspector m_inspector; }; -#endif /* GMIO_SUPPORT_STL_OCC_MESH_H */ /*! @} */ diff --git a/src/gmio_support/stl_occ_meshvs.h b/src/gmio_support/stl_occ_meshvs.h index b118104..7f52908 100644 --- a/src/gmio_support/stl_occ_meshvs.h +++ b/src/gmio_support/stl_occ_meshvs.h @@ -47,8 +47,7 @@ # error C++ compiler required #endif -#ifndef GMIO_SUPPORT_STL_OCC_MESHVS_H -#define GMIO_SUPPORT_STL_OCC_MESHVS_H +#pragma once #include "support_global.h" #include "../gmio_stl/stl_mesh.h" @@ -91,5 +90,4 @@ private: mutable TColStd_Array1OfReal m_element_coords; }; -#endif /* GMIO_SUPPORT_STL_OCC_MESHVS_H */ /*! @} */ diff --git a/src/gmio_support/stl_occ_utils.h b/src/gmio_support/stl_occ_utils.h index 5bc566a..0f1c932 100644 --- a/src/gmio_support/stl_occ_utils.h +++ b/src/gmio_support/stl_occ_utils.h @@ -34,11 +34,9 @@ * @{ */ -#ifndef GMIO_SUPPORT_STL_OCC_UTILS_H -#define GMIO_SUPPORT_STL_OCC_UTILS_H +#pragma once #include - #include #include @@ -56,5 +54,4 @@ GMIO_INLINE void gmio_stl_occ_copy_xyz( gmio_stl_occ_copy_xyz(vec, coords.X(), coords.Y(), coords.Z()); } -#endif /* GMIO_SUPPORT_STL_OCC_UTILS_H */ /*! @} */ diff --git a/src/gmio_support/stream_cpp.h b/src/gmio_support/stream_cpp.h index 3d319e7..0a687a9 100644 --- a/src/gmio_support/stream_cpp.h +++ b/src/gmio_support/stream_cpp.h @@ -38,12 +38,10 @@ # error C++ compiler required #endif -#ifndef GMIO_SUPPORT_STREAM_CPP_H -#define GMIO_SUPPORT_STREAM_CPP_H +#pragma once #include "support_global.h" #include "../gmio_core/stream.h" - #include #include @@ -205,5 +203,4 @@ gmio_stream gmio_ostream_cpp(std::basic_ostream* s) #endif // !DOXYGEN -#endif /* GMIO_SUPPORT_STREAM_CPP_H */ /*! @} */ diff --git a/src/gmio_support/stream_qt.h b/src/gmio_support/stream_qt.h index aa56d80..cb4549d 100644 --- a/src/gmio_support/stream_qt.h +++ b/src/gmio_support/stream_qt.h @@ -38,8 +38,7 @@ # error C++ compiler required #endif -#ifndef GMIO_SUPPORT_STREAM_QT_H -#define GMIO_SUPPORT_STREAM_QT_H +#pragma once #include "support_global.h" #include "../gmio_core/stream.h" @@ -58,5 +57,4 @@ struct gmio_stream gmio_stream_qiodevice( #endif /* !DOXYGEN */ ); -#endif /* GMIO_SUPPORT_STREAM_QT_H */ /*! @} */ diff --git a/src/gmio_support/support_global.h b/src/gmio_support/support_global.h index eea51dc..03177c7 100644 --- a/src/gmio_support/support_global.h +++ b/src/gmio_support/support_global.h @@ -112,10 +112,8 @@ * */ -#ifndef GMIO_SUPPORT_GLOBAL_H -#define GMIO_SUPPORT_GLOBAL_H +#pragma once #include "../gmio_core/global.h" -#endif /* GMIO_SUPPORT_GLOBAL_H */ /*! @} */ diff --git a/tests/core_utils.h b/tests/core_utils.h index 690e041..8ed7882 100644 --- a/tests/core_utils.h +++ b/tests/core_utils.h @@ -27,12 +27,10 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_TESTS_CORE_UTILS_H -#define GMIO_TESTS_CORE_UTILS_H +#pragma once #include "../src/gmio_core/global.h" #include "../src/gmio_core/vecgeom.h" - #include /*! Trim whitespaces in string \p str from end */ @@ -43,5 +41,3 @@ bool gmio_vec3f_equal( const struct gmio_vec3f* lhs, const struct gmio_vec3f* rhs, uint32_t max_ulp_diff); - -#endif /* GMIO_TESTS_CORE_UTILS_H */ diff --git a/tests/stl_testcases.h b/tests/stl_testcases.h index 391dab7..ef3cab3 100644 --- a/tests/stl_testcases.h +++ b/tests/stl_testcases.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_TESTS_STL_TESTCASES_H -#define GMIO_TESTS_STL_TESTCASES_H +#pragma once #include "../src/gmio_core/error.h" #include "../src/gmio_core/stream.h" @@ -54,5 +53,3 @@ extern const char filepath_stlb_header_nofacets[]; extern const char filepath_stlb_empty[]; extern const char filepath_stla_4meshs[]; extern const char filepath_stlb_4meshs[]; - -#endif /* GMIO_TESTS_STL_TESTCASES_H */ diff --git a/tests/stl_utils.h b/tests/stl_utils.h index 740f080..72072b4 100644 --- a/tests/stl_utils.h +++ b/tests/stl_utils.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_TESTS_STL_UTILS_H -#define GMIO_TESTS_STL_UTILS_H +#pragma once #include "../src/gmio_core/global.h" #include "../src/gmio_stl/stl_mesh.h" @@ -86,5 +85,3 @@ struct gmio_stl_data struct gmio_stl_mesh_creator gmio_stl_data_mesh_creator(struct gmio_stl_data* data); struct gmio_stl_mesh gmio_stl_data_mesh(const struct gmio_stl_data* data); - -#endif /* GMIO_TESTS_STL_UTILS_H */ diff --git a/tests/stream_buffer.h b/tests/stream_buffer.h index 7348632..fead7f7 100644 --- a/tests/stream_buffer.h +++ b/tests/stream_buffer.h @@ -27,8 +27,7 @@ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef GMIO_STREAM_BUFFER_H -#define GMIO_STREAM_BUFFER_H +#pragma once #include "../src/gmio_core/stream.h" @@ -53,5 +52,3 @@ struct gmio_rw_buffer gmio_rw_buffer(void* ptr, size_t len, size_t pos); struct gmio_stream gmio_istream_buffer(struct gmio_ro_buffer* buff); struct gmio_stream gmio_stream_buffer(struct gmio_rw_buffer* buff); - -#endif /* GMIO_STREAM_BUFFER_H */