mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
vulkan: Remove unnecessary null checks
These null checkes are slightly misleading when double-checking mutability for external language interop. None of the functions in these files allow the variable at hand to become `NULL` under normal operation, because they are checked at initialization and never (allowed to be) reassigned to `NULL`. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>
This commit is contained in:
parent
ebe7517b8e
commit
3d081c45be
5 changed files with 5 additions and 5 deletions
|
@ -118,7 +118,7 @@ gst_vulkan_command_pool_get_queue (GstVulkanCommandPool * pool)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_VULKAN_COMMAND_POOL (pool), NULL);
|
g_return_val_if_fail (GST_IS_VULKAN_COMMAND_POOL (pool), NULL);
|
||||||
|
|
||||||
return pool->queue ? gst_object_ref (pool->queue) : NULL;
|
return gst_object_ref (pool->queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstVulkanCommandBuffer *
|
static GstVulkanCommandBuffer *
|
||||||
|
|
|
@ -132,7 +132,7 @@ gst_vulkan_descriptor_pool_get_device (GstVulkanDescriptorPool * pool)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_VULKAN_DESCRIPTOR_POOL (pool), NULL);
|
g_return_val_if_fail (GST_IS_VULKAN_DESCRIPTOR_POOL (pool), NULL);
|
||||||
|
|
||||||
return pool->device ? gst_object_ref (pool->device) : NULL;
|
return gst_object_ref (pool->device);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -454,7 +454,7 @@ gst_vulkan_device_get_instance (GstVulkanDevice * device)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_VULKAN_DEVICE (device), NULL);
|
g_return_val_if_fail (GST_IS_VULKAN_DEVICE (device), NULL);
|
||||||
|
|
||||||
return device->instance ? gst_object_ref (device->instance) : NULL;
|
return gst_object_ref (device->instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -968,7 +968,7 @@ gst_vulkan_physical_device_get_instance (GstVulkanPhysicalDevice * device)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_VULKAN_PHYSICAL_DEVICE (device), NULL);
|
g_return_val_if_fail (GST_IS_VULKAN_PHYSICAL_DEVICE (device), NULL);
|
||||||
|
|
||||||
return device->instance ? gst_object_ref (device->instance) : NULL;
|
return gst_object_ref (device->instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -106,7 +106,7 @@ gst_vulkan_queue_get_device (GstVulkanQueue * queue)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_VULKAN_QUEUE (queue), NULL);
|
g_return_val_if_fail (GST_IS_VULKAN_QUEUE (queue), NULL);
|
||||||
|
|
||||||
return queue->device ? gst_object_ref (queue->device) : NULL;
|
return gst_object_ref (queue->device);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue