Commit Graph

22 Commits

Author SHA1 Message Date
Rangi42
e96675be03 Pass std::string references to fstack functions 2024-03-18 14:42:05 -04:00
Rangi42
472d1bde06 Pass std::string references to symbol functions 2024-03-18 14:42:05 -04:00
Rangi42
846a9411b9 Refactor FileStackNode::dump to not need a helper function 2024-03-10 14:14:34 -04:00
Sylvie
820f6b5b3c Consistently format type qualifiers like const on the right (#1347) 2024-03-10 12:21:52 -04:00
Sylvie
53537cf9af Remove now-unnecessary enum keyword (#1338)
C++ does not need it
2024-03-08 19:40:41 -05:00
Rangi42
75cc12bb3d Use std::optional for fstack paths 2024-03-07 21:41:02 -05:00
Rangi42
bd88787cb3 Use FileStackNode constructor to avoid std::monostate possibility 2024-03-05 14:22:29 -05:00
Sylvie
e74073e480 Run clang-format on everything (#1332) 2024-03-04 14:22:49 -05:00
Rangi42
277ea9be28 Replace RGBASM non-null pointers with references 2024-03-03 00:57:03 -05:00
Sylvie
a71e4086a2 Use std::string_view for macro bodies (#1326)
This removes the last use of `strdup`

This required making a lot of related pointers be `const`.
That in turn conflicted with the need to `munmap()` a pointer
eventually, which was similar to the need to eventually `free()`
an `Expansion`'s contents, so I used the same solution of a
`union`. That lets us normally use the `const` pointer for
`const` correctness, and the non-`const` one for the not-really-
mutating destruction cases.
2024-03-02 13:21:28 -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
fc5ab8a14c Clarify comment explaining how referenced works 2024-02-29 13:44:08 -05:00
Rangi42
cf42d035f2 Use std::variant for file stack nodes 2024-02-29 13:44:08 -05:00
Rangi42
0e19f6c0ae Use automatic allocation for fstack nodes' iters/names 2024-02-29 13:44:08 -05:00
Rangi42
1afc8554c0 Use std::deque for file stack nodes 2024-02-29 13:44:08 -05:00
Sylvie
595c066c2a Remove #include <stdbool.h> (#1317) 2024-02-24 10:51:46 -05:00
Sylvie
c0d534f5ad No more flexible array members (not standard C++) (#1307)
* Replace FAMs with `std::vector`s (or one `std::string`) in four `struct`s

* Anonymous types declared in an anonymous union are also non-standard
  Only Clang complains about this (-Wnested-anon-types)
2024-02-22 16:22:37 -05:00
Sylvie
6d29d2a67e Simplify fstk_FindFile usage (#1310)
* Simplify `fstk_FindFile` usage

* Use `std::string` for `fstk_FindFile`
2024-02-22 13:14:38 +01:00
Rangi
1e70e703a7 Build everything as C++ (#1176) 2023-11-07 21:45:56 +01:00