🎨 Move bubblesort string

This commit is contained in:
Scott Lahteine 2025-11-10 12:01:45 -06:00
parent 9393c1ed1b
commit 689c7b83e1

View file

@ -1378,13 +1378,6 @@ void CardReader::cdroot() {
#endif
#endif
#else // !SDSORT_USES_RAM
// By default re-read the names from SD for every compare
// retaining only two filenames at a time. This is very
// slow but is safest and uses minimal RAM.
char name1[LONG_FILENAME_LENGTH];
#endif // SDSORT_USES_RAM
if (fileCnt > 1) {
@ -1496,6 +1489,12 @@ void CardReader::cdroot() {
}
#else
{
#if DISABLED(SDSORT_USES_RAM)
// By default re-read the names from SD for every compare, retaining two
// filenames at a time. This is very slow but is safest and uses minimal RAM.
char name1[LONG_FILENAME_LENGTH];
#endif
// Bubble Sort
for (int16_t i = fileCnt; --i;) {
bool didSwap = false;