fixes to get llvm to compile (excepti for utils.cpp, that'll get fixed

later)

Eradicate the Array almost everywhere, some usages like Stack still
remains
This commit is contained in:
Bigpet 2014-04-10 00:54:32 +02:00 committed by Peter Tissen
parent d65968b41d
commit 25c3aa8e19
92 changed files with 931 additions and 1305 deletions

View file

@ -65,7 +65,7 @@ int cellAudioInit()
}
queue.Clear();
Array<u64> keys;
std::vector<u64> keys;
if(m_audio_out)
{
@ -354,10 +354,10 @@ int cellAudioInit()
index = (position + 1) % port.block; // write new value
}
// load keys:
keys.SetCount(m_config.m_keys.GetCount());
memcpy(keys.GetPtr(), m_config.m_keys.GetPtr(), sizeof(u64) * keys.GetCount());
keys.resize(m_config.m_keys.size());
memcpy(keys.data(), m_config.m_keys.data(), sizeof(u64) * keys.size());
}
for (u32 i = 0; i < keys.GetCount(); i++)
for (u32 i = 0; i < keys.size(); i++)
{
// TODO: check event source
Emu.GetEventManager().SendEvent(keys[i], 0x10103000e010e07, 0, 0, 0);
@ -402,7 +402,7 @@ abort:
m_config.m_is_audio_initialized = false;
m_config.m_keys.Clear();
m_config.m_keys.clear();
for (u32 i = 0; i < m_config.AUDIO_PORT_COUNT; i++)
{
AudioPortConfig& port = m_config.m_ports[i];
@ -736,14 +736,14 @@ int cellAudioSetNotifyEventQueue(u64 key)
SMutexGeneralLocker lock(audioMutex);
for (u32 i = 0; i < m_config.m_keys.GetCount(); i++) // check for duplicates
for (u32 i = 0; i < m_config.m_keys.size(); i++) // check for duplicates
{
if (m_config.m_keys[i] == key)
{
return CELL_AUDIO_ERROR_PARAM;
}
}
m_config.m_keys.AddCpy(key);
m_config.m_keys.push_back(key);
/*EventQueue* eq;
if (!Emu.GetEventManager().GetEventQueue(key, eq))
@ -769,11 +769,11 @@ int cellAudioRemoveNotifyEventQueue(u64 key)
SMutexGeneralLocker lock(audioMutex);
bool found = false;
for (u32 i = 0; i < m_config.m_keys.GetCount(); i++)
for (u32 i = 0; i < m_config.m_keys.size(); i++)
{
if (m_config.m_keys[i] == key)
{
m_config.m_keys.RemoveAt(i);
m_config.m_keys.erase(m_config.m_keys.begin() + i);
found = true;
break;
}
@ -862,4 +862,4 @@ void cellAudio_init()
cellAudio.AddFunc(0xdab029aa, cellAudioAddData);
cellAudio.AddFunc(0xe4046afe, cellAudioGetPortBlockTag);
cellAudio.AddFunc(0xff3626fd, cellAudioRemoveNotifyEventQueue);
}
}