mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Run clang-format on everything (#1332)
This commit is contained in:
@@ -31,10 +31,11 @@ extern bool isWRAM0Mode;
|
||||
extern bool disablePadding;
|
||||
|
||||
// Helper macro for printing verbose-mode messages
|
||||
#define verbosePrint(...) do { \
|
||||
if (beVerbose) \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
} while (0)
|
||||
#define verbosePrint(...) \
|
||||
do { \
|
||||
if (beVerbose) \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
struct FileStackNode {
|
||||
FileStackNode *parent;
|
||||
@@ -43,10 +44,11 @@ struct FileStackNode {
|
||||
|
||||
enum FileStackNodeType type;
|
||||
std::variant<
|
||||
std::monostate, // Default constructed; `.type` and `.data` must be set manually
|
||||
std::vector<uint32_t>, // NODE_REPT
|
||||
std::string // NODE_FILE, NODE_MACRO
|
||||
> data;
|
||||
std::monostate, // Default constructed; `.type` and `.data` must be set manually
|
||||
std::vector<uint32_t>, // NODE_REPT
|
||||
std::string // NODE_FILE, NODE_MACRO
|
||||
>
|
||||
data;
|
||||
|
||||
// REPT iteration counts since last named node, in reverse depth order
|
||||
std::vector<uint32_t> &iters();
|
||||
@@ -58,8 +60,10 @@ struct FileStackNode {
|
||||
std::string const *dumpFileStack() const;
|
||||
};
|
||||
|
||||
void warning(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...) format_(printf, 3, 4);
|
||||
void warning(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...)
|
||||
format_(printf, 3, 4);
|
||||
void error(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...) format_(printf, 3, 4);
|
||||
[[noreturn]] void fatal(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...) format_(printf, 3, 4);
|
||||
[[noreturn]] void fatal(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...)
|
||||
format_(printf, 3, 4);
|
||||
|
||||
#endif // RGBDS_LINK_MAIN_H
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
#include "link/section.hpp"
|
||||
|
||||
#include "linkdefs.hpp"
|
||||
|
||||
#include "link/section.hpp"
|
||||
|
||||
struct Assertion {
|
||||
Patch patch; // Also used for its `.type`
|
||||
std::string message;
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "link/main.hpp"
|
||||
|
||||
#include "linkdefs.hpp"
|
||||
|
||||
#include "link/main.hpp"
|
||||
|
||||
struct FileStackNode;
|
||||
struct Section;
|
||||
struct Symbol;
|
||||
|
||||
@@ -30,9 +30,10 @@ struct Symbol {
|
||||
FileStackNode const *src;
|
||||
int32_t lineNo;
|
||||
std::variant<
|
||||
int32_t, // Constants just have a numeric value
|
||||
Label // Label values refer to an offset within a specific section
|
||||
> data;
|
||||
int32_t, // Constants just have a numeric value
|
||||
Label // Label values refer to an offset within a specific section
|
||||
>
|
||||
data;
|
||||
|
||||
Label &label();
|
||||
Label const &label() const;
|
||||
|
||||
Reference in New Issue
Block a user