mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
rsx: Apply Clang-Tidy fix "readability-container-size-empty"
This commit is contained in:
parent
c4667133c4
commit
81a3b49c2f
6 changed files with 11 additions and 11 deletions
|
@ -430,7 +430,7 @@ std::string VertexProgramDecompiler::Decompile()
|
|||
m_instructions[i].reset();
|
||||
}
|
||||
|
||||
if (m_prog.jump_table.size())
|
||||
if (!m_prog.jump_table.empty())
|
||||
{
|
||||
last_label_addr = *m_prog.jump_table.rbegin();
|
||||
}
|
||||
|
|
|
@ -3022,7 +3022,7 @@ namespace rsx
|
|||
|
||||
void do_update()
|
||||
{
|
||||
if (m_flush_always_cache.size())
|
||||
if (!m_flush_always_cache.empty())
|
||||
{
|
||||
if (m_cache_update_tag.load(std::memory_order_consume) != m_flush_always_update_timestamp)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace rsx
|
|||
{
|
||||
static_cast<image_view*>(image.get())->set_image_resource(resource_id);
|
||||
}
|
||||
else if (icon_buf.size())
|
||||
else if (!icon_buf.empty())
|
||||
{
|
||||
image->set_padding(0, 0, 11, 11); // Half sized icon, 320x176->160x88
|
||||
icon_data = std::make_unique<image_info>(icon_buf);
|
||||
|
@ -228,7 +228,7 @@ namespace rsx
|
|||
}
|
||||
}
|
||||
|
||||
if (!m_list->m_items.size())
|
||||
if (m_list->m_items.empty())
|
||||
{
|
||||
m_no_saves_text = std::make_unique<label>("There is no saved data.");
|
||||
m_no_saves_text->set_font("Arial", 20);
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace rsx
|
|||
|
||||
s32 trophy_notification::show(const SceNpTrophyDetails& trophy, const std::vector<uchar>& trophy_icon_buffer)
|
||||
{
|
||||
if (trophy_icon_buffer.size())
|
||||
if (!trophy_icon_buffer.empty())
|
||||
{
|
||||
icon_info = std::make_unique<image_info>(trophy_icon_buffer);
|
||||
image.set_raw_image(icon_info.get());
|
||||
|
|
|
@ -771,7 +771,7 @@ namespace rsx
|
|||
|
||||
gsl::span<const gsl::byte> thread::get_raw_index_array(const draw_clause& draw_indexed_clause) const
|
||||
{
|
||||
if (element_push_buffer.size())
|
||||
if (!element_push_buffer.empty())
|
||||
{
|
||||
//Indices provided via immediate mode
|
||||
return{(const gsl::byte*)element_push_buffer.data(), ::narrow<u32>(element_push_buffer.size() * sizeof(u32))};
|
||||
|
|
|
@ -484,7 +484,7 @@ namespace vk
|
|||
|
||||
uint32_t get_queue_count() const
|
||||
{
|
||||
if (queue_props.size())
|
||||
if (!queue_props.empty())
|
||||
return (u32)queue_props.size();
|
||||
|
||||
uint32_t count = 0;
|
||||
|
@ -495,7 +495,7 @@ namespace vk
|
|||
|
||||
VkQueueFamilyProperties get_queue_properties(uint32_t queue)
|
||||
{
|
||||
if (!queue_props.size())
|
||||
if (queue_props.empty())
|
||||
{
|
||||
uint32_t count = 0;
|
||||
vkGetPhysicalDeviceQueueFamilyProperties(dev, &count, nullptr);
|
||||
|
@ -2190,7 +2190,7 @@ public:
|
|||
|
||||
if (old_swapchain)
|
||||
{
|
||||
if (swapchain_images.size())
|
||||
if (!swapchain_images.empty())
|
||||
{
|
||||
for (auto &img : swapchain_images)
|
||||
img.discard(dev);
|
||||
|
@ -2270,13 +2270,13 @@ public:
|
|||
|
||||
~context()
|
||||
{
|
||||
if (m_instance || m_vk_instances.size())
|
||||
if (m_instance || !m_vk_instances.empty())
|
||||
close();
|
||||
}
|
||||
|
||||
void close()
|
||||
{
|
||||
if (!m_vk_instances.size()) return;
|
||||
if (m_vk_instances.empty()) return;
|
||||
|
||||
if (m_debugger)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue