Add initial .clang-tidy and fixes

This commit is contained in:
Christian Semmler
2024-01-31 02:16:17 -05:00
parent 9e0b19856c
commit 99c16d1392
306 changed files with 2780 additions and 1958 deletions

View File

@@ -109,14 +109,17 @@ LegoResult LegoFile::Open(const char* p_name, LegoU32 p_mode)
strcat(mode, "r");
}
if (p_mode & c_write) {
if (m_mode != c_read)
if (m_mode != c_read) {
m_mode = c_write;
}
strcat(mode, "w");
}
if ((p_mode & c_text) != 0)
if ((p_mode & c_text) != 0) {
strcat(mode, "t");
else
}
else {
strcat(mode, "b");
}
if (!(m_file = fopen(p_name, mode))) {
return FAILURE;