mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Reduce the header declarations (#1342)
- Since we have style rules to include foo.hpp at the top of its corresponding foo.cpp, this takes any headers included by foo.hpp as being also guaranteed for foo.cpp. - Use C-style <foo.h> instead of <cfoo>, since the latter only guarantees putting symbols in the `std` namespace, which we are not using for C functions (e.g. `printf` not `std::printf`). - Remove now-unused `__PRETTY_FUNCTION__` reporting
This commit is contained in:
2
include/extern/utf8decoder.hpp
vendored
2
include/extern/utf8decoder.hpp
vendored
@@ -3,6 +3,8 @@
|
||||
#ifndef EXTERN_UTF8DECODER_H
|
||||
#define EXTERN_UTF8DECODER_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
uint32_t decode(uint32_t *state, uint32_t *codep, uint8_t byte);
|
||||
|
||||
#endif // EXTERN_UTF8DECODER_H
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#ifndef RGBDS_GFX_RGBA_HPP
|
||||
#define RGBDS_GFX_RGBA_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <stdint.h>
|
||||
|
||||
struct Rgba {
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
#include "platform.hpp" // __PRETTY_FUNCTION__
|
||||
|
||||
template<typename... Ts>
|
||||
static inline void report() {
|
||||
puts(__PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
class EnumSeqIterator {
|
||||
T _value;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Assigning all sections a place
|
||||
#ifndef RGBDS_LINK_ASSIGN_H
|
||||
#define RGBDS_LINK_ASSIGN_H
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Declarations that all modules use, as well as `main` and related
|
||||
#ifndef RGBDS_LINK_MAIN_H
|
||||
#define RGBDS_LINK_MAIN_H
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Declarations related to processing of object (.o) files
|
||||
|
||||
#ifndef RGBDS_LINK_OBJECT_H
|
||||
#define RGBDS_LINK_OBJECT_H
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Outputting the result of linking
|
||||
#ifndef RGBDS_LINK_OUTPUT_H
|
||||
#define RGBDS_LINK_OUTPUT_H
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Applying patches to SECTIONs
|
||||
#ifndef RGBDS_LINK_PATCH_H
|
||||
#define RGBDS_LINK_PATCH_H
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Assigning all sections a place
|
||||
#ifndef RGBDS_LINK_SDAS_OBJ_H
|
||||
#define RGBDS_LINK_SDAS_OBJ_H
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Declarations manipulating symbols
|
||||
#ifndef RGBDS_LINK_SECTION_H
|
||||
#define RGBDS_LINK_SECTION_H
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
// Declarations manipulating symbols
|
||||
#ifndef RGBDS_LINK_SYMBOL_H
|
||||
#define RGBDS_LINK_SYMBOL_H
|
||||
|
||||
|
||||
@@ -22,15 +22,6 @@
|
||||
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
// gcc has __PRETTY_FUNCTION__, MSVC has __FUNCSIG__, __func__ is standard
|
||||
#ifndef __PRETTY_FUNCTION__
|
||||
#ifdef __FUNCSIG__
|
||||
#define __PRETTY_FUNCTION__ __FUNCSIG__
|
||||
#else
|
||||
#define __PRETTY_FUNCTION__ __func__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// MSVC doesn't use POSIX types or defines for `read`
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
|
||||
Reference in New Issue
Block a user