Replace non-leading tabs with spaces, using:

find -type f |  # list all regular files
  grep -E '\.(h|cpp|mm)$' |  # filter for source files
  grep -v '/mt_' |  # filter out generated files
  grep -v '/vendor/' | # and vendored GL
  xargs -n 1 -P $(nproc) ./replace_non_leading_tabs.lua  # reformat everything
This commit is contained in:
Desour
2024-03-21 17:30:28 +01:00
parent 58783e4ca3
commit e7bbbf9e30
42 changed files with 537 additions and 537 deletions

View File

@ -47,12 +47,12 @@ irr::u32 dropMiddleKeys(irr::core::array<T> &array, Cmp &cmp)
if (cmp(array[j], array[s]))
continue; // same key, handle later
if (j > s + 1) // had there been identical keys?
if (j > s + 1) // had there been identical keys?
array[n++] = array[j - 1]; // keep the last
array[n++] = array[j]; // keep the new one
array[n++] = array[j]; // keep the new one
s = j;
}
if (array.size() > s + 1) // identical keys at the array end?
if (array.size() > s + 1) // identical keys at the array end?
array[n++] = array[array.size() - 1]; // keep the last
irr::u32 d = array.size() - n; // remove already copied keys