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:
Sylvie
2024-03-09 14:55:39 -05:00
committed by GitHub
parent 3323cb56fe
commit 17444e825a
39 changed files with 18 additions and 119 deletions

View File

@@ -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

View File

@@ -3,7 +3,6 @@
#ifndef RGBDS_GFX_RGBA_HPP
#define RGBDS_GFX_RGBA_HPP
#include <cstdint>
#include <stdint.h>
struct Rgba {

View File

@@ -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;

View File

@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: MIT */
// Assigning all sections a place
#ifndef RGBDS_LINK_ASSIGN_H
#define RGBDS_LINK_ASSIGN_H

View File

@@ -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

View File

@@ -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

View File

@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: MIT */
// Outputting the result of linking
#ifndef RGBDS_LINK_OUTPUT_H
#define RGBDS_LINK_OUTPUT_H

View File

@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: MIT */
// Applying patches to SECTIONs
#ifndef RGBDS_LINK_PATCH_H
#define RGBDS_LINK_PATCH_H

View File

@@ -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

View File

@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: MIT */
// Declarations manipulating symbols
#ifndef RGBDS_LINK_SECTION_H
#define RGBDS_LINK_SECTION_H

View File

@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: MIT */
// Declarations manipulating symbols
#ifndef RGBDS_LINK_SYMBOL_H
#define RGBDS_LINK_SYMBOL_H

View File

@@ -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>