1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-24 18:39:59 +00:00

Replace some more auto variables

This commit is contained in:
twinaphex 2020-01-23 01:11:10 +01:00
parent 363e7294b6
commit 9ddd8417c8
2 changed files with 18 additions and 18 deletions

@ -2423,8 +2423,8 @@ void Framebuffer::init(DeferredDisposer *disposer)
* the world for framebuffer recreation. */
if (memory.memory != VK_NULL_HANDLE && disposer)
{
auto d = device;
auto m = memory.memory;
VkDevice d = device;
VkDeviceMemory m = memory.memory;
disposer->defer([=] { vkFreeMemory(d, m, nullptr); });
}
@ -2485,11 +2485,11 @@ void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size, VkFor
*
* Fake lambda init captures for C++11.
*/
auto d = device;
auto i = image;
auto v = view;
auto fbv = fb_view;
auto fb = framebuffer;
VkDevice d = device;
VkImage i = image;
VkImageView v = view;
VkImageView fbv = fb_view;
VkFramebuffer fb = framebuffer;
disposer.defer([=]
{
if (fb != VK_NULL_HANDLE)

@ -134,9 +134,9 @@ static bool set_ubo_texture_offset(
size_t offset, bool push_constant)
{
resize_minimum(reflection->semantic_textures[semantic], index + 1);
auto &sem = reflection->semantic_textures[semantic][index];
auto &active = push_constant ? sem.push_constant : sem.uniform;
auto &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
slang_texture_semantic_meta &sem = reflection->semantic_textures[semantic][index];
bool &active = push_constant ? sem.push_constant : sem.uniform;
size_t &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
if (active)
{
@ -164,9 +164,9 @@ static bool set_ubo_float_parameter_offset(
bool push_constant)
{
resize_minimum(reflection->semantic_float_parameters, index + 1);
auto &sem = reflection->semantic_float_parameters[index];
auto &active = push_constant ? sem.push_constant : sem.uniform;
auto &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
slang_semantic_meta &sem = reflection->semantic_float_parameters[index];
bool &active = push_constant ? sem.push_constant : sem.uniform;
size_t &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
if (active)
{
@ -203,9 +203,9 @@ static bool set_ubo_offset(
slang_semantic semantic,
size_t offset, unsigned num_components, bool push_constant)
{
auto &sem = reflection->semantics[semantic];
auto &active = push_constant ? sem.push_constant : sem.uniform;
auto &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
slang_semantic_meta &sem = reflection->semantics[semantic];
bool &active = push_constant ? sem.push_constant : sem.uniform;
size_t &active_offset = push_constant ? sem.push_constant_offset : sem.ubo_offset;
if (active)
{
@ -288,9 +288,9 @@ static bool add_active_buffer_ranges(
{
unsigned sem_index = 0;
unsigned tex_sem_index = 0;
auto &name = compiler.get_member_name(
const string &name = compiler.get_member_name(
resource.base_type_id, ranges[i].index);
auto &type = compiler.get_type(
const SPIRType &type = compiler.get_type(
compiler.get_type(resource.base_type_id).member_types[
ranges[i].index]);
slang_semantic sem = slang_uniform_name_to_semantic(