mirror of https://github.com/snes9xgit/snes9x.git
Fix some unsigned/signed comparisons.
This commit is contained in:
parent
397cb98347
commit
b8d0b8ec9e
|
@ -191,7 +191,7 @@ bool S9xPulseSoundDriver::write_samples(int16_t *data, int samples)
|
|||
|
||||
if (draining)
|
||||
{
|
||||
if (bytes > buffer_size / 2)
|
||||
if (bytes > (size_t)buffer_size / 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -201,13 +201,13 @@ bool S9xPulseSoundDriver::write_samples(int16_t *data, int samples)
|
|||
}
|
||||
}
|
||||
|
||||
if (samples * 2 > bytes)
|
||||
if ((size_t)samples * 2 > bytes)
|
||||
{
|
||||
draining = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (samples * 2 < bytes)
|
||||
if ((size_t)samples * 2 < bytes)
|
||||
bytes = samples * 2;
|
||||
|
||||
if (bytes == 0)
|
||||
|
|
|
@ -205,7 +205,7 @@ bool Context::init_device(int preferred_device)
|
|||
return device_list[0];
|
||||
};
|
||||
|
||||
if (preferred_device > -1 && preferred_device < device_list.size())
|
||||
if (preferred_device > -1 && (size_t)preferred_device < device_list.size())
|
||||
physical_device = device_list[preferred_device];
|
||||
else
|
||||
physical_device = find_device();
|
||||
|
|
|
@ -55,7 +55,7 @@ SimpleOutput::~SimpleOutput()
|
|||
void SimpleOutput::create_objects()
|
||||
{
|
||||
descriptors.clear();
|
||||
for (size_t i = 0; i < queue_size; i++)
|
||||
for (int i = 0; i < queue_size; i++)
|
||||
{
|
||||
vk::DescriptorSetAllocateInfo dsai{};
|
||||
dsai
|
||||
|
|
Loading…
Reference in New Issue