1
0
Fork 0

Codechange: use std::fill_n/copy_n over MemSetT/MemCpyT

pull/10004/merge
Rubidium 2025-05-06 18:13:57 +02:00 committed by rubidium42
parent 0d922c9d62
commit cc51b29234
2 changed files with 3 additions and 5 deletions

View File

@ -11,7 +11,6 @@
#include "../zoom_func.h"
#include "../settings_type.h"
#include "../core/math_func.hpp"
#include "../core/mem_func.hpp"
#include "8bpp_optimized.hpp"
#include "../safeguards.h"
@ -96,7 +95,7 @@ void Blitter_8bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Z
}
case BlitterMode::BlackRemap:
MemSetT(dst, 0, pixels);
std::fill_n(dst, pixels, 0);
dst += pixels;
break;
@ -112,7 +111,7 @@ void Blitter_8bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Z
}
default:
MemCpyT(dst, src, pixels);
std::copy_n(src, pixels, dst);
dst += pixels; src += pixels;
break;
}

View File

@ -19,7 +19,6 @@
#include "gfx_func.h"
#include "zoom_func.h"
#include "core/random_func.hpp"
#include "core/mem_func.hpp"
#include "error.h"
#include "core/geometry_func.hpp"
#include "string_func.h"
@ -439,7 +438,7 @@ void MusicSystem::SaveCustomPlaylist(PlaylistChoices pl)
}
size_t num = 0;
MemSetT(settings_pl, 0, NUM_SONGS_PLAYLIST);
std::fill_n(settings_pl, NUM_SONGS_PLAYLIST, 0);
for (const auto &song : this->standard_playlists[pl]) {
/* Music set indices in the settings playlist are 1-based, 0 means unused slot */