Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-12-04 13:28:09 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-12-04 13:28:09 +0300
commit958df2ed1b6037b98eb73bb8e063732ba851854f (patch)
tree566cc879adb0f5bdc8aaa8ccc3b67525264f3dab /source/blender
parentf0df46287adf8553bac03bbaf8bbe67ad8652080 (diff)
Cleanup: Clang-Tidy, modernize-deprecated-headers
No functional changes.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/rand.cc8
-rw-r--r--source/blender/blenlib/intern/task_pool.cc2
-rw-r--r--source/blender/blenlib/intern/task_range.cc2
-rw-r--r--source/blender/blenlib/intern/threads.cc6
-rw-r--r--source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_heap_simple_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_heap_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_math_rotation_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_stack_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_task_test.cc2
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp2
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.cpp2
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp2
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp4
-rw-r--r--source/blender/compositor/intern/COM_Node.cpp2
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cpp2
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp2
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc4
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_volume.cc2
-rw-r--r--source/blender/depsgraph/intern/node/deg_node.cc2
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_component.cc2
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_id.cc2
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp2
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp2
-rw-r--r--source/blender/freestyle/intern/geometry/FitCurve.cpp4
-rw-r--r--source/blender/freestyle/intern/geometry/GeomCleaner.cpp2
-rw-r--r--source/blender/freestyle/intern/geometry/Noise.cpp8
-rw-r--r--source/blender/freestyle/intern/image/GaussianFilter.cpp2
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeCamera.cpp4
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp2
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.cpp2
-rw-r--r--source/blender/gpu/intern/gpu_batch.cc2
-rw-r--r--source/blender/gpu/intern/gpu_select_sample_query.cc2
-rw-r--r--source/blender/gpu/intern/gpu_uniform_buffer.cc2
-rw-r--r--source/blender/gpu/intern/gpu_vertex_format.cc4
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc2
-rw-r--r--source/blender/gpu/opengl/gl_drawlist.cc2
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp4
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.cpp6
-rw-r--r--source/blender/imbuf/intern/dds/FlipDXT.cpp2
-rw-r--r--source/blender/imbuf/intern/dds/Image.cpp2
-rw-r--r--source/blender/imbuf/intern/dds/Stream.cpp4
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp8
-rw-r--r--source/blender/io/alembic/exporter/abc_subdiv_disabler.cc2
-rw-r--r--source/blender/io/collada/AnimationImporter.cpp2
-rw-r--r--source/blender/io/collada/DocumentExporter.cpp8
-rw-r--r--source/blender/io/collada/ErrorHandler.cpp2
-rw-r--r--source/blender/io/collada/ExtraHandler.cpp2
-rw-r--r--source/blender/io/collada/ExtraTags.cpp4
-rw-r--r--source/blender/io/collada/SkinInfo.cpp2
-rw-r--r--source/blender/io/common/intern/abstract_hierarchy_iterator.cc4
-rw-r--r--source/blender/io/common/intern/object_identifier.cc2
-rw-r--r--source/blender/nodes/geometry/node_geometry_tree.cc2
-rw-r--r--source/blender/nodes/intern/node_socket.cc2
73 files changed, 105 insertions, 105 deletions
diff --git a/source/blender/blenlib/intern/rand.cc b/source/blender/blenlib/intern/rand.cc
index c61e17e6627..8dbfffbad20 100644
--- a/source/blender/blenlib/intern/rand.cc
+++ b/source/blender/blenlib/intern/rand.cc
@@ -21,10 +21,10 @@
* \ingroup bli
*/
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenlib/intern/task_pool.cc b/source/blender/blenlib/intern/task_pool.cc
index 1a119e135d5..142496dce20 100644
--- a/source/blender/blenlib/intern/task_pool.cc
+++ b/source/blender/blenlib/intern/task_pool.cc
@@ -20,8 +20,8 @@
* Task pool to run tasks in parallel.
*/
+#include <cstdlib>
#include <memory>
-#include <stdlib.h>
#include <utility>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenlib/intern/task_range.cc b/source/blender/blenlib/intern/task_range.cc
index 229129bd088..c2498de1af8 100644
--- a/source/blender/blenlib/intern/task_range.cc
+++ b/source/blender/blenlib/intern/task_range.cc
@@ -20,7 +20,7 @@
* Task parallel range functions.
*/
-#include <stdlib.h>
+#include <cstdlib>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc
index a2b1a12c783..0586c361350 100644
--- a/source/blender/blenlib/intern/threads.cc
+++ b/source/blender/blenlib/intern/threads.cc
@@ -21,9 +21,9 @@
* \ingroup bli
*/
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc b/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc
index 390f687dbd1..e9ca3c68a71 100644
--- a/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc
+++ b/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc
@@ -2,7 +2,7 @@
#include "testing/testing.h"
-#include <string.h>
+#include <cstring>
#include "BLI_expr_pylike_eval.h"
#include "BLI_math.h"
diff --git a/source/blender/blenlib/tests/BLI_heap_simple_test.cc b/source/blender/blenlib/tests/BLI_heap_simple_test.cc
index f3a65125eeb..97644fc26ab 100644
--- a/source/blender/blenlib/tests/BLI_heap_simple_test.cc
+++ b/source/blender/blenlib/tests/BLI_heap_simple_test.cc
@@ -1,7 +1,7 @@
/* Apache License, Version 2.0 */
#include "testing/testing.h"
-#include <string.h>
+#include <cstring>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenlib/tests/BLI_heap_test.cc b/source/blender/blenlib/tests/BLI_heap_test.cc
index 8b207c17c84..b8fc62e46ca 100644
--- a/source/blender/blenlib/tests/BLI_heap_test.cc
+++ b/source/blender/blenlib/tests/BLI_heap_test.cc
@@ -1,7 +1,7 @@
/* Apache License, Version 2.0 */
#include "testing/testing.h"
-#include <string.h>
+#include <cstring>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenlib/tests/BLI_math_rotation_test.cc b/source/blender/blenlib/tests/BLI_math_rotation_test.cc
index 1b1c4ef24a1..02257ba83dd 100644
--- a/source/blender/blenlib/tests/BLI_math_rotation_test.cc
+++ b/source/blender/blenlib/tests/BLI_math_rotation_test.cc
@@ -4,7 +4,7 @@
#include "BLI_math_rotation.h"
-#include <math.h>
+#include <cmath>
/* Test that quaternion converts to itself via matrix. */
static void test_quat_to_mat_to_quat(float w, float x, float y, float z)
diff --git a/source/blender/blenlib/tests/BLI_stack_test.cc b/source/blender/blenlib/tests/BLI_stack_test.cc
index 211916e3193..1fef5998b99 100644
--- a/source/blender/blenlib/tests/BLI_stack_test.cc
+++ b/source/blender/blenlib/tests/BLI_stack_test.cc
@@ -1,7 +1,7 @@
/* Apache License, Version 2.0 */
#include "testing/testing.h"
-#include <string.h>
+#include <cstring>
#include "BLI_array.h"
#include "BLI_stack.h"
diff --git a/source/blender/blenlib/tests/BLI_task_test.cc b/source/blender/blenlib/tests/BLI_task_test.cc
index 2a3fddf5e3d..fce3e56d105 100644
--- a/source/blender/blenlib/tests/BLI_task_test.cc
+++ b/source/blender/blenlib/tests/BLI_task_test.cc
@@ -1,7 +1,7 @@
/* Apache License, Version 2.0 */
#include "testing/testing.h"
-#include <string.h>
+#include <cstring>
#include "atomic_ops.h"
diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
index e95dd4233c4..b111fba44b7 100644
--- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
+++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
@@ -17,7 +17,7 @@
*/
#include "COM_ChunkOrderHotspot.h"
-#include <math.h>
+#include <cmath>
ChunkOrderHotspot::ChunkOrderHotspot(int x, int y, float addition)
{
diff --git a/source/blender/compositor/intern/COM_CompositorContext.cpp b/source/blender/compositor/intern/COM_CompositorContext.cpp
index 52e705ffb79..2e168221b7b 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.cpp
+++ b/source/blender/compositor/intern/COM_CompositorContext.cpp
@@ -18,7 +18,7 @@
#include "COM_CompositorContext.h"
#include "COM_defines.h"
-#include <stdio.h>
+#include <cstdio>
CompositorContext::CompositorContext()
{
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index 9b3355f535a..d8f67571ee5 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
-#include <string.h>
+#include <cstring>
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 27cec28f5d5..b026d2e60d9 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -17,9 +17,9 @@
*/
#include <algorithm>
-#include <math.h>
+#include <cmath>
+#include <cstdlib>
#include <sstream>
-#include <stdlib.h>
#include "atomic_ops.h"
diff --git a/source/blender/compositor/intern/COM_Node.cpp b/source/blender/compositor/intern/COM_Node.cpp
index 74aefaf0e6d..897d4e1df02 100644
--- a/source/blender/compositor/intern/COM_Node.cpp
+++ b/source/blender/compositor/intern/COM_Node.cpp
@@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
-#include <string.h>
+#include <cstring>
#include "BKE_node.h"
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cpp b/source/blender/compositor/intern/COM_NodeOperation.cpp
index 0842721a9e5..1a30806f28c 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperation.cpp
@@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
-#include <stdio.h>
+#include <cstdio>
#include <typeinfo>
#include "COM_ExecutionSystem.h"
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 450b64eec5a..f726caa3d66 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -16,8 +16,8 @@
* Copyright 2011, Blender Foundation.
*/
+#include <cstdio>
#include <list>
-#include <stdio.h>
#include "COM_CPUDevice.h"
#include "COM_OpenCLDevice.h"
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index 7ef0d7b7606..fbbd373ba09 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
-#include <stdlib.h>
+#include <cstdlib>
#include "BLI_math.h"
#include "COM_DoubleEdgeMaskOperation.h"
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index e87d40b4c86..157c595afcb 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
-#include <limits.h>
+#include <climits>
#include "BLI_utildefines.h"
#include "COM_FastGaussianBlurOperation.h"
diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
index f7fabfb9572..21d9177ddd5 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_OutputFileMultiViewOperation.h"
#include "COM_OutputFileOperation.h"
-#include <string.h>
+#include <cstring>
#include "BLI_listbase.h"
#include "BLI_path_util.h"
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index c5623fdbd37..2676ab1b9ca 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_OutputFileOperation.h"
-#include <string.h>
+#include <cstring>
#include "BLI_listbase.h"
#include "BLI_path_util.h"
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
index 0776c97563e..d3f59ffcb15 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
@@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
-#include <string.h>
+#include <cstring>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/compositor/operations/COM_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp
index 7f7c1b7b639..37b7d68d495 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.cpp
+++ b/source/blender/compositor/operations/COM_WrapOperation.cpp
@@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
-#include <math.h>
+#include <cmath>
#include "COM_WrapOperation.h"
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 574978e5a5f..9fb995bf463 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_WriteBufferOperation.h"
#include "COM_OpenCLDevice.h"
#include "COM_defines.h"
-#include <stdio.h>
+#include <cstdio>
WriteBufferOperation::WriteBufferOperation(DataType datatype)
{
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 9cae343dcde..d71cdea1974 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -25,8 +25,8 @@
#include "intern/builder/deg_builder_nodes.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
index 3c55d832568..8ba4b4a427f 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
@@ -25,8 +25,8 @@
#include "intern/builder/deg_builder_nodes.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc
index 7a6dc6e2315..c7669b9fecb 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc
@@ -25,8 +25,8 @@
#include "intern/builder/deg_builder_nodes.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc b/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
index 4406cc83a0d..197e14c1a21 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
@@ -23,8 +23,8 @@
#include "intern/builder/deg_builder_pchanmap.h"
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
#include "BLI_utildefines.h"
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index a55966632d8..3f6aa778b59 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -25,9 +25,9 @@
#include "intern/builder/deg_builder_relations.h"
+#include <cstdio>
+#include <cstdlib>
#include <cstring> /* required for STREQ later on. */
-#include <stdio.h>
-#include <stdlib.h>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index 39a60c9029c..32c36d78250 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -25,9 +25,9 @@
#include "intern/builder/deg_builder_relations.h"
+#include <cstdio>
+#include <cstdlib>
#include <cstring> /* required for STREQ later on. */
-#include <stdio.h>
-#include <stdlib.h>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
index b58d4a22712..8df8d4914c3 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
@@ -25,9 +25,9 @@
#include "intern/builder/deg_builder_relations.h"
+#include <cstdio>
+#include <cstdlib>
#include <cstring> /* required for STREQ later on. */
-#include <stdio.h>
-#include <stdlib.h>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index d0eedd6d811..1a334d8a451 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -25,7 +25,7 @@
#include "MEM_guardedalloc.h"
-#include <string.h> /* XXX: memcpy */
+#include <cstring> /* XXX: memcpy */
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index aec3dd4b9ea..95ee8234ef3 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -25,9 +25,9 @@
#include "intern/depsgraph_tag.h"
+#include <cstdio>
#include <cstring> /* required for memset */
#include <queue>
-#include <stdio.h>
#include "BLI_math_bits.h"
#include "BLI_task.h"
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_volume.cc b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_volume.cc
index 8e9fff56023..8fe0dd95bc2 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_volume.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_volume.cc
@@ -31,7 +31,7 @@
#include "BKE_volume.h"
-#include <stdio.h>
+#include <cstdio>
namespace blender::deg {
diff --git a/source/blender/depsgraph/intern/node/deg_node.cc b/source/blender/depsgraph/intern/node/deg_node.cc
index 6266acae651..0d3563ee3de 100644
--- a/source/blender/depsgraph/intern/node/deg_node.cc
+++ b/source/blender/depsgraph/intern/node/deg_node.cc
@@ -23,7 +23,7 @@
#include "intern/node/deg_node.h"
-#include <stdio.h>
+#include <cstdio>
#include "BLI_utildefines.h"
diff --git a/source/blender/depsgraph/intern/node/deg_node_component.cc b/source/blender/depsgraph/intern/node/deg_node_component.cc
index 6ffe5db3fec..d824fb14718 100644
--- a/source/blender/depsgraph/intern/node/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_component.cc
@@ -23,8 +23,8 @@
#include "intern/node/deg_node_component.h"
+#include <cstdio>
#include <cstring> /* required for STREQ later on. */
-#include <stdio.h>
#include "BLI_ghash.h"
#include "BLI_hash.hh"
diff --git a/source/blender/depsgraph/intern/node/deg_node_id.cc b/source/blender/depsgraph/intern/node/deg_node_id.cc
index 345da466960..4f2fcab5823 100644
--- a/source/blender/depsgraph/intern/node/deg_node_id.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_id.cc
@@ -23,8 +23,8 @@
#include "intern/node/deg_node_id.h"
+#include <cstdio>
#include <cstring> /* required for STREQ later on. */
-#include <stdio.h>
#include "BLI_string.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index 63612694e65..e24700a57d8 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -22,7 +22,7 @@ extern "C" {
#include <Python.h>
}
-#include <float.h>
+#include <cfloat>
#include <fstream>
#include <string>
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index 8aaffd4dde8..f761b1f6243 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -64,7 +64,7 @@
#include "render_types.h"
-#include <limits.h>
+#include <climits>
namespace Freestyle {
diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp
index 5682ccc9298..66914929960 100644
--- a/source/blender/freestyle/intern/geometry/FitCurve.cpp
+++ b/source/blender/freestyle/intern/geometry/FitCurve.cpp
@@ -20,9 +20,9 @@
* \brief from "Graphics Gems", Academic Press, 1990
*/
+#include <cmath>
+#include <cstdio>
#include <cstdlib> // for malloc and free
-#include <math.h>
-#include <stdio.h>
#include "FitCurve.h"
diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp
index b1d0a6c7e2a..6a499c07061 100644
--- a/source/blender/freestyle/intern/geometry/GeomCleaner.cpp
+++ b/source/blender/freestyle/intern/geometry/GeomCleaner.cpp
@@ -29,9 +29,9 @@
# endif
#endif
+#include <cstdio>
#include <list>
#include <map>
-#include <stdio.h>
#include "GeomCleaner.h"
diff --git a/source/blender/freestyle/intern/geometry/Noise.cpp b/source/blender/freestyle/intern/geometry/Noise.cpp
index 7c42c332370..e3ea2ac154f 100644
--- a/source/blender/freestyle/intern/geometry/Noise.cpp
+++ b/source/blender/freestyle/intern/geometry/Noise.cpp
@@ -19,10 +19,10 @@
* \brief Class to define Perlin noise
*/
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <ctime>
#include "BLI_compiler_attrs.h"
#include "BLI_rand.h"
diff --git a/source/blender/freestyle/intern/image/GaussianFilter.cpp b/source/blender/freestyle/intern/image/GaussianFilter.cpp
index 3bbe86ee986..3c8bf5bd3a1 100644
--- a/source/blender/freestyle/intern/image/GaussianFilter.cpp
+++ b/source/blender/freestyle/intern/image/GaussianFilter.cpp
@@ -19,7 +19,7 @@
* \brief Class to perform gaussian filtering operations on an image
*/
-#include <stdlib.h>
+#include <cstdlib>
#include "GaussianFilter.h"
diff --git a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
index 052ae73da43..4fc1f227172 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
@@ -19,8 +19,8 @@
* \brief Class to represent a light node
*/
-#include <math.h>
-#include <string.h> // for memcpy
+#include <cmath>
+#include <cstring> // for memcpy
#include "NodeCamera.h"
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index c3dac81477d..768e9efa15d 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -19,7 +19,7 @@
* \brief Class to define a container for curves
*/
-#include <stdio.h> /* printf */
+#include <cstdio> /* printf */
#include "Curve.h"
#include "CurveAdvancedIterators.h"
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
index 7e8937bfe80..9bf00ed7092 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
@@ -19,7 +19,7 @@
* \brief Detects/flags/builds extended features edges on the WXEdge structure
*/
-#include <float.h>
+#include <cfloat>
#include "FEdgeXDetector.h"
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp
index 60d0e45b9fb..d304c3616d7 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp
@@ -19,7 +19,7 @@
* \brief Classes to define a View Map (ViewVertex, ViewEdge, etc.)
*/
-#include <float.h>
+#include <cfloat>
#include "ViewMap.h"
#include "ViewMapAdvancedIterators.h"
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index aed5d6b5adc..774751a2589 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -19,7 +19,7 @@
* \brief Functions to manage I/O for the view map
*/
-#include <limits.h>
+#include <climits>
#include "ViewMapIO.h"
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
index 1702a22c678..0ee491a071c 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
@@ -33,7 +33,7 @@
* \brief OGF/Graphite: Geometry and Graphics Programming Library + Utilities
*/
-#include <assert.h>
+#include <cassert>
#include <cstdlib> // for malloc and free
#include <set>
#include <stack>
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc
index 3bf1233c000..cdb158572b7 100644
--- a/source/blender/gpu/intern/gpu_batch.cc
+++ b/source/blender/gpu/intern/gpu_batch.cc
@@ -42,7 +42,7 @@
#include "gpu_batch_private.hh"
-#include <string.h>
+#include <cstring>
using namespace blender::gpu;
diff --git a/source/blender/gpu/intern/gpu_select_sample_query.cc b/source/blender/gpu/intern/gpu_select_sample_query.cc
index 6ca811895a5..74506232655 100644
--- a/source/blender/gpu/intern/gpu_select_sample_query.cc
+++ b/source/blender/gpu/intern/gpu_select_sample_query.cc
@@ -24,7 +24,7 @@
* similar to glRenderMode(GL_SELECT) since the goal is to maintain compatibility.
*/
-#include <stdlib.h>
+#include <cstdlib>
#include "GPU_debug.h"
#include "GPU_framebuffer.h"
diff --git a/source/blender/gpu/intern/gpu_uniform_buffer.cc b/source/blender/gpu/intern/gpu_uniform_buffer.cc
index 89c70c47e4a..3edb090d81c 100644
--- a/source/blender/gpu/intern/gpu_uniform_buffer.cc
+++ b/source/blender/gpu/intern/gpu_uniform_buffer.cc
@@ -22,7 +22,7 @@
*/
#include "MEM_guardedalloc.h"
-#include <string.h>
+#include <cstring>
#include "BLI_blenlib.h"
#include "BLI_math_base.h"
diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc
index 3b0aa055588..cd6d78a185d 100644
--- a/source/blender/gpu/intern/gpu_vertex_format.cc
+++ b/source/blender/gpu/intern/gpu_vertex_format.cc
@@ -27,8 +27,8 @@
#include "gpu_shader_private.hh"
#include "gpu_vertex_format_private.h"
-#include <stddef.h>
-#include <string.h>
+#include <cstddef>
+#include <cstring>
#include "BLI_ghash.h"
#include "BLI_string.h"
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index 4e45ff11fc7..0914c117241 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -42,7 +42,7 @@
#include "gl_debug.hh"
-#include <stdio.h>
+#include <cstdio>
static CLG_LogRef LOG = {"gpu.debug"};
diff --git a/source/blender/gpu/opengl/gl_drawlist.cc b/source/blender/gpu/opengl/gl_drawlist.cc
index aecadc4d14a..c374a7bdc9d 100644
--- a/source/blender/gpu/opengl/gl_drawlist.cc
+++ b/source/blender/gpu/opengl/gl_drawlist.cc
@@ -39,7 +39,7 @@
#include "gl_drawlist.hh"
#include "gl_primitive.hh"
-#include <limits.h>
+#include <climits>
using namespace blender::gpu;
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index 61f2153cf6c..6846a09f57b 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -23,8 +23,8 @@
*/
#include <cmath>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include <vector>
/* iTaSC headers */
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
index 37e30d30e2c..2a36946df8f 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
@@ -52,9 +52,9 @@
#include <DirectDrawSurface.h>
#include <PixelFormat.h>
-#include <math.h> /* sqrt */
-#include <stdio.h> /* printf */
-#include <stdlib.h> /* malloc */
+#include <cmath> /* sqrt */
+#include <cstdio> /* printf */
+#include <cstdlib> /* malloc */
#include <sys/types.h>
/*** declarations ***/
diff --git a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp
index 9b07084bf81..e96b7891f1e 100644
--- a/source/blender/imbuf/intern/dds/FlipDXT.cpp
+++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp
@@ -36,7 +36,7 @@
#include "IMB_imbuf_types.h"
-#include <string.h>
+#include <cstring>
#include <BlockDXT.h>
#include <ColorBlock.h>
diff --git a/source/blender/imbuf/intern/dds/Image.cpp b/source/blender/imbuf/intern/dds/Image.cpp
index 7958a586c7d..9dfa5dd2621 100644
--- a/source/blender/imbuf/intern/dds/Image.cpp
+++ b/source/blender/imbuf/intern/dds/Image.cpp
@@ -30,7 +30,7 @@
#include <Color.h>
#include <Image.h>
-#include <stdio.h> /* printf */
+#include <cstdio> /* printf */
Image::Image() : m_width(0), m_height(0), m_format(Format_RGB), m_data(nullptr)
{
diff --git a/source/blender/imbuf/intern/dds/Stream.cpp b/source/blender/imbuf/intern/dds/Stream.cpp
index 59892a0a228..3dab3c35675 100644
--- a/source/blender/imbuf/intern/dds/Stream.cpp
+++ b/source/blender/imbuf/intern/dds/Stream.cpp
@@ -20,8 +20,8 @@
#include <Stream.h>
-#include <stdio.h> /* printf */
-#include <string.h> /* memcpy */
+#include <cstdio> /* printf */
+#include <cstring> /* memcpy */
static const char *msg_error_seek = "DDS: trying to seek beyond end of stream (corrupt file?)";
static const char *msg_error_read = "DDS: trying to read beyond end of stream (corrupt file?)";
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index 804d8130b4c..e767cb14b1a 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -23,10 +23,10 @@
#include <DirectDrawSurface.h>
#include <FlipDXT.h>
#include <Stream.h>
+#include <cstddef>
+#include <cstdio> /* printf */
#include <dds_api.h>
#include <fstream>
-#include <stddef.h>
-#include <stdio.h> /* printf */
#if defined(WIN32)
# include "utfconv.h"
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 56188fbe98a..28d73bff47d 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -22,14 +22,14 @@
*/
#include <algorithm>
-#include <errno.h>
+#include <cerrno>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
#include <fstream>
#include <iostream>
#include <set>
-#include <stddef.h>
#include <stdexcept>
-#include <stdio.h>
-#include <stdlib.h>
#include <string>
#include <Iex.h>
diff --git a/source/blender/io/alembic/exporter/abc_subdiv_disabler.cc b/source/blender/io/alembic/exporter/abc_subdiv_disabler.cc
index 334a26df784..8073e157c13 100644
--- a/source/blender/io/alembic/exporter/abc_subdiv_disabler.cc
+++ b/source/blender/io/alembic/exporter/abc_subdiv_disabler.cc
@@ -18,7 +18,7 @@
*/
#include "abc_subdiv_disabler.h"
-#include <stdio.h>
+#include <cstdio>
#include "BLI_listbase.h"
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp
index 2e7977d89bb..850b6a813ed 100644
--- a/source/blender/io/collada/AnimationImporter.cpp
+++ b/source/blender/io/collada/AnimationImporter.cpp
@@ -18,7 +18,7 @@
* \ingroup collada
*/
-#include <stddef.h>
+#include <cstddef>
/* COLLADABU_ASSERT, may be able to remove later */
#include "COLLADABUPlatform.h"
diff --git a/source/blender/io/collada/DocumentExporter.cpp b/source/blender/io/collada/DocumentExporter.cpp
index 241afbd4034..46dfdda4ede 100644
--- a/source/blender/io/collada/DocumentExporter.cpp
+++ b/source/blender/io/collada/DocumentExporter.cpp
@@ -19,9 +19,9 @@
*/
#include <algorithm> /* std::find */
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
#include <vector>
#include "COLLADASWAsset.h"
@@ -121,7 +121,7 @@ extern "C" char build_hash[];
#include "MaterialExporter.h"
#include "SceneExporter.h"
-#include <errno.h>
+#include <cerrno>
char *bc_CustomData_get_layer_name(const struct CustomData *data, int type, int n)
{
diff --git a/source/blender/io/collada/ErrorHandler.cpp b/source/blender/io/collada/ErrorHandler.cpp
index 7467d519f28..844065e3ba3 100644
--- a/source/blender/io/collada/ErrorHandler.cpp
+++ b/source/blender/io/collada/ErrorHandler.cpp
@@ -26,7 +26,7 @@
#include "GeneratedSaxParserParserError.h"
-#include <string.h>
+#include <cstring>
#include "BLI_utildefines.h"
diff --git a/source/blender/io/collada/ExtraHandler.cpp b/source/blender/io/collada/ExtraHandler.cpp
index 8aefb321dd6..11cb75fb5e9 100644
--- a/source/blender/io/collada/ExtraHandler.cpp
+++ b/source/blender/io/collada/ExtraHandler.cpp
@@ -19,7 +19,7 @@
*/
#include "BLI_string.h"
-#include <stddef.h>
+#include <cstddef>
#include "ExtraHandler.h"
diff --git a/source/blender/io/collada/ExtraTags.cpp b/source/blender/io/collada/ExtraTags.cpp
index d8fbf96db51..8c63a21f88a 100644
--- a/source/blender/io/collada/ExtraTags.cpp
+++ b/source/blender/io/collada/ExtraTags.cpp
@@ -19,8 +19,8 @@
*/
#include "BLI_string.h"
-#include <stddef.h>
-#include <stdlib.h>
+#include <cstddef>
+#include <cstdlib>
#include <iostream>
diff --git a/source/blender/io/collada/SkinInfo.cpp b/source/blender/io/collada/SkinInfo.cpp
index 19a4a4f61c2..8f6f1e467d9 100644
--- a/source/blender/io/collada/SkinInfo.cpp
+++ b/source/blender/io/collada/SkinInfo.cpp
@@ -21,7 +21,7 @@
#include <algorithm>
#if !defined(WIN32)
-# include <stdint.h>
+# include <cstdint>
#endif
/* COLLADABU_ASSERT, may be able to remove later */
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
index fc47b024be1..eaa4d2fdde7 100644
--- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
@@ -19,10 +19,10 @@
#include "IO_abstract_hierarchy_iterator.h"
#include "dupli_parent_finder.hh"
+#include <climits>
+#include <cstdio>
#include <iostream>
-#include <limits.h>
#include <sstream>
-#include <stdio.h>
#include <string>
#include "BKE_anim_data.h"
diff --git a/source/blender/io/common/intern/object_identifier.cc b/source/blender/io/common/intern/object_identifier.cc
index a2d2d998bec..5d0b89b0630 100644
--- a/source/blender/io/common/intern/object_identifier.cc
+++ b/source/blender/io/common/intern/object_identifier.cc
@@ -21,7 +21,7 @@
#include "BKE_duplilist.h"
extern "C" {
-#include <limits.h> /* For INT_MAX. */
+#include <climits> /* For INT_MAX. */
}
#include <cstring>
#include <sstream>
diff --git a/source/blender/nodes/geometry/node_geometry_tree.cc b/source/blender/nodes/geometry/node_geometry_tree.cc
index 69f9f7fb4ed..da77e8896fb 100644
--- a/source/blender/nodes/geometry/node_geometry_tree.cc
+++ b/source/blender/nodes/geometry/node_geometry_tree.cc
@@ -14,7 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <string.h>
+#include <cstring>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc
index d4b1df2f3f0..ebc70956147 100644
--- a/source/blender/nodes/intern/node_socket.cc
+++ b/source/blender/nodes/intern/node_socket.cc
@@ -21,7 +21,7 @@
* \ingroup nodes
*/
-#include <limits.h>
+#include <climits>
#include "DNA_node_types.h"