Use automatic allocation for STRFMT args

This commit is contained in:
Rangi42
2024-02-22 20:39:37 -05:00
committed by Sylvie
parent 6b2c6c20bc
commit 6a23c5fd48
2 changed files with 26 additions and 42 deletions

View File

@@ -4,6 +4,7 @@
#define RGBDS_FORMAT_SPEC_H
#include <stdint.h>
#include <vector>
enum FormatState {
FORMAT_SIGN, // expects '+' or ' ' (optional)
@@ -36,12 +37,9 @@ struct StrFmtArg {
bool isNumeric;
};
#define INITIAL_STRFMT_ARG_SIZE 4
struct StrFmtArgList {
char *format;
size_t nbArgs;
size_t capacity;
struct StrFmtArg *args;
std::vector<struct StrFmtArg> *args;
};
struct FormatSpec fmt_NewSpec(void);