fix compilation on GCC 12

This commit is contained in:
tildearrow 2022-05-26 13:31:17 -05:00
parent c52db81d00
commit 9d36cf5ff0
3 changed files with 8 additions and 5 deletions

View file

@ -67,6 +67,7 @@
*/
#include "n163.hpp"
#include <string.h>
void n163_core::tick()
{
@ -126,12 +127,12 @@ void n163_core::reset()
// reset this chip
m_disable = false;
m_multiplex = true;
std::fill(std::begin(m_ram), std::end(m_ram), 0);
memset(m_ram,0,sizeof(m_ram));
m_voice_cycle = 0x78;
m_addr_latch.reset();
m_out = 0;
m_acc = 0;
std::fill(std::begin(m_ch_out), std::end(m_ch_out), 0);
memset(m_ch_out,0,sizeof(m_ch_out));
}
// accessor

View file

@ -322,6 +322,7 @@
*/
#include "scc.hpp"
#include <string.h>
// shared SCC features
void scc_core::tick()
@ -372,12 +373,12 @@ void scc_core::reset()
m_test.reset();
m_out = 0;
std::fill(std::begin(m_reg), std::end(m_reg), 0);
memset(m_reg,0,sizeof(m_reg));
}
void scc_core::voice_t::reset()
{
std::fill(std::begin(wave), std::end(wave), 0);
memset(wave,0,sizeof(wave));
enable = false;
pitch = 0;
volume = 0;

View file

@ -81,6 +81,7 @@
*/
#include "vrcvi.hpp"
#include <string.h>
void vrcvi_core::tick()
{
@ -119,7 +120,7 @@ void vrcvi_core::reset()
m_timer.reset();
m_control.reset();
m_out = 0;
std::fill(std::begin(m_ch_out),std::end(m_ch_out),0);
memset(m_ch_out,0,sizeof(m_ch_out));
}
bool vrcvi_core::alu_t::tick()