Closed jtxa closed 1 year ago
Moved new/delete out of for-loop. Force pushed.
I assume that all new/delete call in SRecord may be replaced by something more modern; smart pointers and their helper functions or so. At least RAII shall be used, RAII may also be useful elsewhere (I haven't looked how files are opened/closed).
But I did not invest any time on that for now, because this change should be simple & straight forward so we can enforce warning free check soon.
But I did not invest any time on that for now, because this change should be simple & straight forward so we can enforce warning free check soon.
Totally agree with this. Happy to look into RAII and other more modern approaches if there is a solid reason to rewrite. Let's chat!
I stupidly hit close (facepalm). Merging now
Fixed most warnings for
-std=c++11 -pedantic -Wall -Wextra
. Disabled only-Wno-implicit-fallthrough
on gcc for now. info for older gcc,-pedantic
may throw more messages: gcc-8 doesn't like the extra ; on the end of namespace.Added a gcc-11 build to QA workflow, enabled
-Werror
for it and clang. Added-k 0
to ninja call, to keep it compiling all files.write_record_data
matches quite well the function directly about itwrite_record_header
.