mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-12-29 02:40:41 -07:00
🎨 Move bubblesort string
This commit is contained in:
parent
9393c1ed1b
commit
689c7b83e1
1 changed files with 6 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue