summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-03-17 07:33:00 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-03-17 07:36:24 +0100
commitcb282c6ef0bb91957f8a6f422705813bd47c788c (patch)
tree7eba92b08fc89f46f1b7402b86372cfcc82486db /drivers
parentc5d76139dc9c5721e09e0e782bed5ccf1789554b (diff)
Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dummy/rasterizer_dummy.h6
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp8
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.h10
-rw-r--r--drivers/gles2/shader_compiler_gles2.h2
-rw-r--r--drivers/gles2/shader_gles2.h2
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp16
-rw-r--r--drivers/vulkan/rendering_device_vulkan.h8
7 files changed, 26 insertions, 26 deletions
diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h
index 4df28e3ea4..4dc634aefa 100644
--- a/drivers/dummy/rasterizer_dummy.h
+++ b/drivers/dummy/rasterizer_dummy.h
@@ -167,7 +167,7 @@ public:
Vector<uint8_t> index_array;
int index_count;
AABB aabb;
- Vector<Vector<uint8_t> > blend_shapes;
+ Vector<Vector<uint8_t>> blend_shapes;
Vector<AABB> bone_aabbs;
};
@@ -181,8 +181,8 @@ public:
mutable RID_PtrOwner<DummyMesh> mesh_owner;
virtual RID texture_2d_create(const Ref<Image> &p_image) { return RID(); }
- virtual RID texture_2d_layered_create(const Vector<Ref<Image> > &p_layers, VS::TextureLayeredType p_layered_type) { return RID(); }
- virtual RID texture_3d_create(const Vector<Ref<Image> > &p_slices) { return RID(); }
+ virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, VS::TextureLayeredType p_layered_type) { return RID(); }
+ virtual RID texture_3d_create(const Vector<Ref<Image>> &p_slices) { return RID(); }
virtual RID texture_proxy_create(RID p_base) { return RID(); }
virtual void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) {}
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index 55b1c7e560..0f5452effc 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -2270,7 +2270,7 @@ static Vector<uint8_t> _unpack_half_floats(const Vector<uint8_t> &array, uint32_
return ret;
}
-void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) {
+void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t>> &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) {
Mesh *mesh = mesh_owner.getornull(p_mesh);
ERR_FAIL_COND(!mesh);
@@ -2737,10 +2737,10 @@ AABB RasterizerStorageGLES2::mesh_surface_get_aabb(RID p_mesh, int p_surface) co
return mesh->surfaces[p_surface]->aabb;
}
-Vector<Vector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
+Vector<Vector<uint8_t>> RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
const Mesh *mesh = mesh_owner.getornull(p_mesh);
- ERR_FAIL_COND_V(!mesh, Vector<Vector<uint8_t> >());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t> >());
+ ERR_FAIL_COND_V(!mesh, Vector<Vector<uint8_t>>());
+ ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t>>());
#ifndef TOOLS_ENABLED
ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
#endif
diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h
index 6fbfe57778..86965730e0 100644
--- a/drivers/gles2/rasterizer_storage_gles2.h
+++ b/drivers/gles2/rasterizer_storage_gles2.h
@@ -275,7 +275,7 @@ public:
RenderTarget *render_target;
- Vector<Ref<Image> > images;
+ Vector<Ref<Image>> images;
bool redraw_if_visible;
@@ -541,7 +541,7 @@ public:
Map<StringName, Variant> params;
SelfList<Material> list;
SelfList<Material> dirty_list;
- Vector<Pair<StringName, RID> > textures;
+ Vector<Pair<StringName, RID>> textures;
float line_width;
int render_priority;
@@ -650,7 +650,7 @@ public:
Vector<uint8_t> data;
Vector<uint8_t> index_data;
- Vector<Vector<uint8_t> > blend_shape_data;
+ Vector<Vector<uint8_t>> blend_shape_data;
int total_data_size;
@@ -702,7 +702,7 @@ public:
virtual RID mesh_create();
- virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>());
+ virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t>> &p_blend_shapes = Vector<Vector<uint8_t>>(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>());
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount);
virtual int mesh_get_blend_shape_count(RID p_mesh) const;
@@ -725,7 +725,7 @@ public:
virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const;
- virtual Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const;
+ virtual Vector<Vector<uint8_t>> mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const;
virtual Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const;
virtual void mesh_remove_surface(RID p_mesh, int p_surface);
diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h
index e39ef5e7bd..dd10a27c0d 100644
--- a/drivers/gles2/shader_compiler_gles2.h
+++ b/drivers/gles2/shader_compiler_gles2.h
@@ -41,7 +41,7 @@ class ShaderCompilerGLES2 {
public:
struct IdentifierActions {
- Map<StringName, Pair<int *, int> > render_mode_values;
+ Map<StringName, Pair<int *, int>> render_mode_values;
Map<StringName, bool *> render_mode_flags;
Map<StringName, bool *> usage_flag_pointers;
Map<StringName, bool *> write_flag_pointers;
diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h
index f2953c9ae8..d5e8159479 100644
--- a/drivers/gles2/shader_gles2.h
+++ b/drivers/gles2/shader_gles2.h
@@ -179,7 +179,7 @@ private:
int max_image_units;
- Map<StringName, Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value> > > uniform_values;
+ Map<StringName, Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value>>> uniform_values;
protected:
_FORCE_INLINE_ int _get_uniform(int p_which) const;
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 361982b28d..76541c3cd5 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -57,7 +57,7 @@ void RenderingDeviceVulkan::_free_dependencies(RID p_id) {
//direct dependencies must be freed
- Map<RID, Set<RID> >::Element *E = dependency_map.find(p_id);
+ Map<RID, Set<RID>>::Element *E = dependency_map.find(p_id);
if (E) {
while (E->get().size()) {
@@ -72,7 +72,7 @@ void RenderingDeviceVulkan::_free_dependencies(RID p_id) {
if (E) {
for (Set<RID>::Element *F = E->get().front(); F; F = F->next()) {
- Map<RID, Set<RID> >::Element *G = dependency_map.find(F->get());
+ Map<RID, Set<RID>>::Element *G = dependency_map.find(F->get());
ERR_CONTINUE(!G);
ERR_CONTINUE(!G->get().has(p_id));
G->get().erase(p_id);
@@ -1555,7 +1555,7 @@ void RenderingDeviceVulkan::_buffer_memory_barrier(VkBuffer buffer, uint64_t p_f
/**** TEXTURE ****/
/*****************/
-RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data) {
+RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t>> &p_data) {
_THREAD_SAFE_METHOD_
@@ -3568,8 +3568,8 @@ bool RenderingDeviceVulkan::_uniform_add_binding(Vector<Vector<VkDescriptorSetLa
RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages) {
//descriptor layouts
- Vector<Vector<VkDescriptorSetLayoutBinding> > set_bindings;
- Vector<Vector<UniformInfo> > uniform_info;
+ Vector<Vector<VkDescriptorSetLayoutBinding>> set_bindings;
+ Vector<Vector<UniformInfo>> uniform_info;
Shader::PushConstant push_constant;
push_constant.push_constant_size = 0;
push_constant.push_constants_vk_stage = 0;
@@ -4223,9 +4223,9 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
DescriptorPoolKey pool_key;
//to keep them alive until update call
- List<Vector<VkDescriptorBufferInfo> > buffer_infos;
- List<Vector<VkBufferView> > buffer_views;
- List<Vector<VkDescriptorImageInfo> > image_infos;
+ List<Vector<VkDescriptorBufferInfo>> buffer_infos;
+ List<Vector<VkBufferView>> buffer_views;
+ List<Vector<VkDescriptorImageInfo>> image_infos;
//used for verification to make sure a uniform set does not use a framebuffer bound texture
Vector<RID> attachable_textures;
Vector<Texture *> mutable_sampled_textures;
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h
index 30c10e922e..4a224f0ceb 100644
--- a/drivers/vulkan/rendering_device_vulkan.h
+++ b/drivers/vulkan/rendering_device_vulkan.h
@@ -98,8 +98,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
VkDevice device;
- Map<RID, Set<RID> > dependency_map; //IDs to IDs that depend on it
- Map<RID, Set<RID> > reverse_dependency_map; //same as above, but in reverse
+ Map<RID, Set<RID>> dependency_map; //IDs to IDs that depend on it
+ Map<RID, Set<RID>> reverse_dependency_map; //same as above, but in reverse
void _add_dependency(RID p_id, RID p_depends_on);
void _free_dependencies(RID p_id);
@@ -602,7 +602,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
uint32_t usage;
};
- Map<DescriptorPoolKey, Set<DescriptorPool *> > descriptor_pools;
+ Map<DescriptorPoolKey, Set<DescriptorPool *>> descriptor_pools;
uint32_t max_descriptors_per_pool;
DescriptorPool *_descriptor_pool_allocate(const DescriptorPoolKey &p_key);
@@ -968,7 +968,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
void _free_rids(T &p_owner, const char *p_type);
public:
- virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data = Vector<Vector<uint8_t> >());
+ virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t>> &p_data = Vector<Vector<uint8_t>>());
virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture);
virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D);