mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-26 09:27:16 +00:00
Simplify std::fill
with std::fill_n
This commit is contained in:
parent
7c96762f5f
commit
b6ec8ddc20
@ -203,7 +203,7 @@ u32 SectorReader::ReadChunk(u8* buffer, u64 chunk_num)
|
||||
{
|
||||
if (!GetBlock(block_num + i, buffer))
|
||||
{
|
||||
std::fill(buffer, buffer + (cnt_blocks - i) * m_block_size, 0u);
|
||||
std::fill_n(buffer, (cnt_blocks - i) * m_block_size, 0u);
|
||||
return i;
|
||||
}
|
||||
buffer += m_block_size;
|
||||
|
@ -60,7 +60,7 @@ inline void CON_BlankRow(const int y)
|
||||
int columns = 0, rows = 0;
|
||||
CON_GetMetrics(&columns, &rows);
|
||||
char blank[columns];
|
||||
std::fill(blank, blank + columns, ' ');
|
||||
std::fill_n(blank, columns, ' ');
|
||||
blank[columns - 1] = '\0';
|
||||
CON_Printf(0, y, "%s", blank);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user