Commit Graph

586 Commits

Author SHA1 Message Date
Rangi42 aed172071b Replace some macros with static functions or constants 2024-03-07 16:10:05 -05:00
Rangi42 2fd95381a6 Get rid of some fixed-size char buffers 2024-03-07 14:36:30 -05:00
Rangi42 e5b7e65e91 Use std::nothrow from <new> with every new allocation 2024-03-07 09:56:15 -05:00
Rangi42 6d4a61f51d Fix some numeric bases in RGBLINK output 2024-03-06 17:43:26 -05:00
Rangi42 bd88787cb3 Use FileStackNode constructor to avoid std::monostate possibility 2024-03-05 14:22:29 -05:00
Rangi42 74539f08ba Add some more trailing commas 2024-03-04 22:53:11 -05:00
Sylvie e74073e480 Run clang-format on everything (#1332) 2024-03-04 14:22:49 -05:00
Rangi42 f2c875e71e Avoid using std::get except in holds_alternative-asserting accessors 2024-03-03 23:33:23 -05:00
Sylvie 447c561aaa Use std::variant for symbol values (#1330) 2024-03-03 21:16:36 -05:00
Rangi42 930a5c3e44 Replace RGBLINK non-null pointers with references 2024-03-03 00:57:03 -05:00
Rangi42 2e1b0b6421 Remove commented-out C-only macro features 2024-03-02 20:17:22 -05:00
Rangi42 52f8ecc347 We do not call malloc/free any more 2024-03-02 08:16:44 -05:00
Sylvie 446fb07fd5 Use std::deque<std::vector> for free space (#1323) 2024-03-01 16:21:29 -05:00
Sylvie 1ac3c0262f Refactor structs to use methods instead of functions (#1322) 2024-03-01 13:11:45 -05:00
Rangi42 e14ba664ea Remove redundant (void) parameter declarations 2024-03-01 10:41:47 -05:00
Sylvie 043db49676 Replace NULL with nullptr (#1321) 2024-02-29 15:06:33 -05:00
Sylvie eff8c324c8 Remove now-unnecessary struct keyword (#1320)
C++ acts like structs are `typedef`ed by default

We do have to keep `struct stat`, since there's ambiguity
with the function also called `stat`.
2024-02-29 14:41:58 -05:00
Rangi42 cf08fed067 Use std::vector for SDCC object section data 2024-02-29 13:44:08 -05:00
Rangi42 c44b336e1b Use std::vector for SDCC object line buffer 2024-02-29 13:44:08 -05:00
Rangi42 e90084ad06 Rename isWRA0Mode to isWRAM0Mode 2024-02-29 13:44:08 -05:00
Rangi42 2ff723f943 Use vec.data() instead of &vec[0]
In general `vec.data()` is always safe, whereas `&vec[0]`
may fail when `vec` is empty.
2024-02-29 13:44:08 -05:00
Rangi42 17df94c75b Remove now-unnecessary cleanup functions 2024-02-29 13:44:08 -05:00
Rangi42 96f354026a Use automatic allocation for section data 2024-02-29 13:44:08 -05:00
Rangi42 8fe6be19f1 Use automatic allocation for tryReadstring 2024-02-29 13:44:08 -05:00
Rangi42 002eed405b Use automatic allocation for assertion error messages 2024-02-29 13:44:08 -05:00
Rangi42 ef1c1440a0 Use automatic allocation for symbol names 2024-02-29 13:44:08 -05:00
Rangi42 826512730c Use automatic allocation for section symbols 2024-02-29 13:44:08 -05:00
Rangi42 5a26a48d11 Use automatic allocation for section names 2024-02-29 13:44:08 -05:00
Rangi42 3c0af94c5c Use automatic allocation for patches 2024-02-29 13:44:08 -05:00
Rangi42 0cc49782ab Use std::variant and automatic allocation for file stack node data 2024-02-29 13:44:08 -05:00
Rangi42 e1ac51d7da Use std::vector's .size() for SDCC sections and symbols 2024-02-29 13:44:08 -05:00
Rangi42 48b2e94aa3 Use std::string for symbol/section/node names and assertion messages 2024-02-29 13:44:08 -05:00
Rangi42 52ac98c294 Use std::vector for section data 2024-02-29 13:44:08 -05:00
Rangi42 4cd88ade54 Use automatic allocation for object file symbols 2024-02-29 13:44:08 -05:00
Rangi42 dead69eb2c Use std::vector for section symbols 2024-02-29 13:44:08 -05:00
Rangi42 f47ce337bf Use std::vector for reading object file symbols 2024-02-29 13:44:08 -05:00
Rangi42 9a51fbafb3 Use std::vector for file stack nodes 2024-02-29 13:44:08 -05:00
Rangi42 3d23f5bbb3 Use std::vector for reading object file sections 2024-02-29 13:44:08 -05:00
Rangi42 5075ac8887 Use std::vector for RPN expressions 2024-02-29 13:44:08 -05:00
Rangi42 d792ee4b61 Use std::vector for section patches 2024-02-29 13:44:08 -05:00
Rangi42 b207bff157 Use std::vector for fstack REPT nodes 2024-02-29 13:44:08 -05:00
Rangi42 b8e267e387 Use std::vector for SDAS file sections 2024-02-29 13:44:08 -05:00
Rangi42 a5ea25cde5 Use automatic allocation for RPN stack 2024-02-29 13:44:08 -05:00
Rangi42 003977a9fb Use std::deque for unassigned sections 2024-02-29 13:44:08 -05:00
Rangi42 26a93a530b Use std::deque for assertions
Also fix a memory leak
2024-02-29 13:44:08 -05:00
Rangi42 2df4fff6c9 Use std::vector for sorted symbols 2024-02-29 13:44:08 -05:00
Rangi42 b74b40abd2 Use std::deque for sorted sections 2024-02-29 13:44:08 -05:00
Rangi42 f44701c02d Use std::map for rgblink symbols and sections 2024-02-29 13:44:08 -05:00
Rangi42 d5de3fa111 Use std::deque for symbol lists
Also fix a memory leak that this reveals
2024-02-29 13:44:08 -05:00
Rangi42 d87b1ed22a Refactor some redundant error/warning-printing code 2024-02-24 19:05:29 -05:00