mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-06 02:00:25 +02:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user