Skip to content

Commit 7df533d

Browse files
Merge pull request #122 from janisozaur/superfluous-const
Remove superfluous const from simple return types
2 parents e68bd87 + 6cefc1d commit 7df533d

8 files changed

Lines changed: 14 additions & 14 deletions

File tree

include/misc/buffer_create_info.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace Anvil
104104
VkDeviceSize in_start_offset,
105105
VkDeviceSize in_size);
106106

107-
const void* const get_client_data() const
107+
const void* get_client_data() const
108108
{
109109
return m_client_data_ptr;
110110
}
@@ -287,4 +287,4 @@ namespace Anvil
287287
ANVIL_DISABLE_COPY_CONSTRUCTOR(BufferCreateInfo);
288288
};
289289
}; /* namespace Anvil */
290-
#endif /* MISC_BUFFER_CREATE_INFO_H */
290+
#endif /* MISC_BUFFER_CREATE_INFO_H */

include/misc/glsl_to_spirv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ namespace Anvil
305305
}
306306

307307
/** Returns the number of bytes the SPIR-V blob, accessible via get_spirv_blob(), takes. */
308-
const uint32_t get_spirv_blob_size() const
308+
uint32_t get_spirv_blob_size() const
309309
{
310310
if (m_spirv_blob.size() == 0)
311311
{

include/misc/image_view_create_info.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ namespace Anvil
295295
}
296296

297297
/** Returns image view's format */
298-
const Anvil::Format get_format() const
298+
Anvil::Format get_format() const
299299
{
300300
return m_format;
301301
}
@@ -330,7 +330,7 @@ namespace Anvil
330330
}
331331

332332
/** Returns image view type of the image view instance */
333-
const Anvil::ImageViewType get_type() const
333+
Anvil::ImageViewType get_type() const
334334
{
335335
return m_type;
336336
}
@@ -443,4 +443,4 @@ namespace Anvil
443443

444444
}; /* namespace Anvil */
445445

446-
#endif/* MISC_IMAGE_VIEW_CREATE_INFO_H */
446+
#endif/* MISC_IMAGE_VIEW_CREATE_INFO_H */

include/misc/struct_chainer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace Anvil
7979
struct_chain_ptrs.push_back(std::move(inout_struct_chain_ptr) );
8080
}
8181

82-
const uint32_t get_n_structs() const
82+
uint32_t get_n_structs() const
8383
{
8484
return static_cast<uint32_t>(root_structs.size() );
8585
}
@@ -307,4 +307,4 @@ namespace Anvil
307307
};
308308
};
309309

310-
#endif /* MISC_STRUCT_CHAINER_H */
310+
#endif /* MISC_STRUCT_CHAINER_H */

include/wrappers/command_buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ namespace Anvil
319319
}
320320

321321
/** Returns a handle to the raw Vulkan command buffer instance, encapsulated by the object */
322-
const VkCommandBuffer get_command_buffer() const
322+
VkCommandBuffer get_command_buffer() const
323323
{
324324
return m_command_buffer;
325325
}

include/wrappers/framebuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace Anvil
6060
*
6161
* @return Raw Vulkan framebuffer handle or VK_NULL_HANDLE, if the function failed.
6262
**/
63-
const VkFramebuffer get_framebuffer(Anvil::RenderPass* in_render_pass_ptr);
63+
VkFramebuffer get_framebuffer(Anvil::RenderPass* in_render_pass_ptr);
6464

6565
private:
6666
/* Private type declarations */
@@ -111,4 +111,4 @@ namespace Anvil
111111
};
112112
};
113113

114-
#endif /* WRAPPERS_FRAMEBUFFER_H */
114+
#endif /* WRAPPERS_FRAMEBUFFER_H */

include/wrappers/image_view.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace Anvil
6565
}
6666

6767
/** Returns the encapsulated raw Vulkan image view handle. */
68-
const VkImageView get_image_view() const
68+
VkImageView get_image_view() const
6969
{
7070
return m_image_view;
7171
}
@@ -100,4 +100,4 @@ namespace Anvil
100100
};
101101
};
102102

103-
#endif /* WRAPPERS_IMAGE_VIEW_H */
103+
#endif /* WRAPPERS_IMAGE_VIEW_H */

src/wrappers/framebuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Anvil::FramebufferUniquePtr Anvil::Framebuffer::create(Anvil::FramebufferCreateI
202202
}
203203

204204
/* Please see header for specification */
205-
const VkFramebuffer Anvil::Framebuffer::get_framebuffer(Anvil::RenderPass* in_render_pass_ptr)
205+
VkFramebuffer Anvil::Framebuffer::get_framebuffer(Anvil::RenderPass* in_render_pass_ptr)
206206
{
207207
auto fb_iterator = m_baked_framebuffers.find(in_render_pass_ptr);
208208
VkFramebuffer result_fb = VK_NULL_HANDLE;

0 commit comments

Comments
 (0)