Replace include guards with pragma once

This commit is contained in:
Jaby
2023-10-05 21:40:04 +02:00
parent 19f8303d99
commit db1bbec06e
42 changed files with 83 additions and 193 deletions

View File

@@ -1,5 +1,4 @@
#ifndef __JABYENGINE_ARRAY_RANGE_HPP__
#define __JABYENGINE_ARRAY_RANGE_HPP__
#pragma once
#include "../../stddef.h"
namespace JabyEngine {
@@ -39,6 +38,4 @@ namespace JabyEngine {
return this->start[idx];
}
};
}
#endif //!__JABYENGINE_ARRAY_RANGE_HPP__
}

View File

@@ -1,5 +1,4 @@
#ifndef __JABYENGINE_BITS_HPP__
#define __JABYENGINE_BITS_HPP__
#pragma once
#include "../jabyengine_defines.h"
#include "types.hpp"
@@ -153,5 +152,4 @@ namespace JabyEngine {
}
}
#define __start_end_bit2_start_length(start_bit, end_bit) start_bit, (end_bit - start_bit + 1)
#endif //!__JABYENGINE_BITS_HPP__
#define __start_end_bit2_start_length(start_bit, end_bit) start_bit, (end_bit - start_bit + 1)

View File

@@ -1,5 +1,4 @@
#ifndef __JABYENGINE_CIRCULAR_BUFFER_HPP__
#define __JABYENGINE_CIRCULAR_BUFFER_HPP__
#pragma once
#include "array_range.hpp"
namespace JabyEngine {
@@ -59,6 +58,4 @@ namespace JabyEngine {
return (this->read_adr != this->write_adr);
}
};
}
#endif //!__JABYENGINE_CIRCULAR_BUFFER_HPP__
}

View File

@@ -1,5 +1,4 @@
#ifndef __JABYENGINE_LZ4_DECOMPRESSOR_HPP__
#define __JABYENGINE_LZ4_DECOMPRESSOR_HPP__
#pragma once
#include "../../stddef.h"
#include "array_range.hpp"
#include "types.hpp"
@@ -76,6 +75,4 @@ namespace JabyEngine {
Result process(ArrayRange<const uint8_t> data, bool is_last);
};
}
#endif //!__JABYENGINE_LZ4_DECOMPRESSOR_HPP__
}

View File

@@ -1,5 +1,4 @@
#ifndef __JABYENGINE_MATH_HELPER_HPP__
#define __JABYENGINE_MATH_HELPER_HPP__
#pragma once
#include "types.hpp"
namespace JabyEngine {
@@ -13,6 +12,4 @@ namespace JabyEngine {
const auto [tenth, rest] = div_and_mod(value, static_cast<uint8_t>(10));
return (tenth << 4 | rest);
}
}
#endif //!__JABYENGINE_MATH_HELPER_HPP__
}

View File

@@ -1,5 +1,4 @@
#ifndef __JABYENGINE_TYPE_TRAITS_HPP__
#define __JABYENGINE_TYPE_TRAITS_HPP__
#pragma once
namespace JabyEngine {
template <class T, T v>
@@ -76,6 +75,4 @@ namespace JabyEngine {
using variadic_force_same = enable_if<conjunction<is_same<T, Ts>...>::value>::type;
// #############################################
}
#endif //! __JABYENGINE_TYPE_TRAITS_HPP__
}

View File

@@ -1,5 +1,4 @@
#ifndef __JABYENGINE_TYPES_HPP__
#define __JABYENGINE_TYPES_HPP__
#pragma once
namespace JabyEngine {
template<typename T, typename S>
@@ -31,6 +30,4 @@ namespace JabyEngine {
Done,
Error
};
}
#endif //!__JABYENGINE_TYPES_HPP__
}

View File

@@ -1,11 +1,8 @@
#ifndef __JABYENGINE_UNALIGNED_READ_HPP__
#define __JABYENGINE_UNALIGNED_READ_HPP__
#pragma once
#include "../../stdint.h"
namespace JabyEngine {
uint16_t unaligned_lhu(const uint8_t* adr) {
return (static_cast<uint16_t>(adr[0]) | static_cast<uint16_t>(adr[1]) << 8);
}
}
#endif //!__JABYENGINE_UNALIGNED_READ_HPP__
}