Cleanup: Clang-Tidy, modernize-deprecated-headers

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2020-12-04 11:28:09 +01:00
parent f0df46287a
commit 958df2ed1b
74 changed files with 105 additions and 106 deletions

View File

@ -34,7 +34,6 @@ Checks: >
modernize-*,
-modernize-use-auto,
-modernize-use-trailing-return-type,
-modernize-deprecated-headers,
-modernize-avoid-c-arrays,
-modernize-use-equals-default,
-modernize-use-nodiscard,

View File

@ -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"

View File

@ -20,8 +20,8 @@
* Task pool to run tasks in parallel.
*/
#include <cstdlib>
#include <memory>
#include <stdlib.h>
#include <utility>
#include "MEM_guardedalloc.h"

View File

@ -20,7 +20,7 @@
* Task parallel range functions.
*/
#include <stdlib.h>
#include <cstdlib>
#include "MEM_guardedalloc.h"

View File

@ -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"

View File

@ -2,7 +2,7 @@
#include "testing/testing.h"
#include <string.h>
#include <cstring>
#include "BLI_expr_pylike_eval.h"
#include "BLI_math.h"

View File

@ -1,7 +1,7 @@
/* Apache License, Version 2.0 */
#include "testing/testing.h"
#include <string.h>
#include <cstring>
#include "MEM_guardedalloc.h"

View File

@ -1,7 +1,7 @@
/* Apache License, Version 2.0 */
#include "testing/testing.h"
#include <string.h>
#include <cstring>
#include "MEM_guardedalloc.h"

View File

@ -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)

View File

@ -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"

View File

@ -1,7 +1,7 @@
/* Apache License, Version 2.0 */
#include "testing/testing.h"
#include <string.h>
#include <cstring>
#include "atomic_ops.h"

View File

@ -17,7 +17,7 @@
*/
#include "COM_ChunkOrderHotspot.h"
#include <math.h>
#include <cmath>
ChunkOrderHotspot::ChunkOrderHotspot(int x, int y, float addition)
{

View File

@ -18,7 +18,7 @@
#include "COM_CompositorContext.h"
#include "COM_defines.h"
#include <stdio.h>
#include <cstdio>
CompositorContext::CompositorContext()
{

View File

@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
#include <string.h>
#include <cstring>
#include "DNA_node_types.h"

View File

@ -17,9 +17,9 @@
*/
#include <algorithm>
#include <math.h>
#include <cmath>
#include <cstdlib>
#include <sstream>
#include <stdlib.h>
#include "atomic_ops.h"

View File

@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
#include <string.h>
#include <cstring>
#include "BKE_node.h"

View File

@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
#include <stdio.h>
#include <cstdio>
#include <typeinfo>
#include "COM_ExecutionSystem.h"

View File

@ -16,8 +16,8 @@
* Copyright 2011, Blender Foundation.
*/
#include <cstdio>
#include <list>
#include <stdio.h>
#include "COM_CPUDevice.h"
#include "COM_OpenCLDevice.h"

View File

@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
#include <stdlib.h>
#include <cstdlib>
#include "BLI_math.h"
#include "COM_DoubleEdgeMaskOperation.h"

View File

@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
#include <limits.h>
#include <climits>
#include "BLI_utildefines.h"
#include "COM_FastGaussianBlurOperation.h"

View File

@ -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"

View File

@ -18,7 +18,7 @@
#include "COM_OutputFileOperation.h"
#include <string.h>
#include <cstring>
#include "BLI_listbase.h"
#include "BLI_path_util.h"

View File

@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
#include <string.h>
#include <cstring>
#include "MEM_guardedalloc.h"

View File

@ -16,7 +16,7 @@
* Copyright 2011, Blender Foundation.
*/
#include <math.h>
#include <cmath>
#include "COM_WrapOperation.h"

View File

@ -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)
{

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -31,7 +31,7 @@
#include "BKE_volume.h"
#include <stdio.h>
#include <cstdio>
namespace blender::deg {

View File

@ -23,7 +23,7 @@
#include "intern/node/deg_node.h"
#include <stdio.h>
#include <cstdio>
#include "BLI_utildefines.h"

View File

@ -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"

View File

@ -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"

View File

@ -22,7 +22,7 @@ extern "C" {
#include <Python.h>
}
#include <float.h>
#include <cfloat>
#include <fstream>
#include <string>

View File

@ -64,7 +64,7 @@
#include "render_types.h"
#include <limits.h>
#include <climits>
namespace Freestyle {

View File

@ -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"

View File

@ -29,9 +29,9 @@
# endif
#endif
#include <cstdio>
#include <list>
#include <map>
#include <stdio.h>
#include "GeomCleaner.h"

View File

@ -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"

View File

@ -19,7 +19,7 @@
* \brief Class to perform gaussian filtering operations on an image
*/
#include <stdlib.h>
#include <cstdlib>
#include "GaussianFilter.h"

View File

@ -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"

View File

@ -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"

View File

@ -19,7 +19,7 @@
* \brief Detects/flags/builds extended features edges on the WXEdge structure
*/
#include <float.h>
#include <cfloat>
#include "FEdgeXDetector.h"

View File

@ -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"

View File

@ -19,7 +19,7 @@
* \brief Functions to manage I/O for the view map
*/
#include <limits.h>
#include <climits>
#include "ViewMapIO.h"

View File

@ -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>

View File

@ -42,7 +42,7 @@
#include "gpu_batch_private.hh"
#include <string.h>
#include <cstring>
using namespace blender::gpu;

View File

@ -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"

View File

@ -22,7 +22,7 @@
*/
#include "MEM_guardedalloc.h"
#include <string.h>
#include <cstring>
#include "BLI_blenlib.h"
#include "BLI_math_base.h"

View File

@ -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"

View File

@ -42,7 +42,7 @@
#include "gl_debug.hh"
#include <stdio.h>
#include <cstdio>
static CLG_LogRef LOG = {"gpu.debug"};

View File

@ -39,7 +39,7 @@
#include "gl_drawlist.hh"
#include "gl_primitive.hh"
#include <limits.h>
#include <climits>
using namespace blender::gpu;

View File

@ -23,8 +23,8 @@
*/
#include <cmath>
#include <stdlib.h>
#include <string.h>
#include <cstdlib>
#include <cstring>
#include <vector>
/* iTaSC headers */

View File

@ -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 ***/

View File

@ -36,7 +36,7 @@
#include "IMB_imbuf_types.h"
#include <string.h>
#include <cstring>
#include <BlockDXT.h>
#include <ColorBlock.h>

View File

@ -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)
{

View File

@ -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?)";

View File

@ -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"

View File

@ -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>

View File

@ -18,7 +18,7 @@
*/
#include "abc_subdiv_disabler.h"
#include <stdio.h>
#include <cstdio>
#include "BLI_listbase.h"

View File

@ -18,7 +18,7 @@
* \ingroup collada
*/
#include <stddef.h>
#include <cstddef>
/* COLLADABU_ASSERT, may be able to remove later */
#include "COLLADABUPlatform.h"

View File

@ -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)
{

View File

@ -26,7 +26,7 @@
#include "GeneratedSaxParserParserError.h"
#include <string.h>
#include <cstring>
#include "BLI_utildefines.h"

View File

@ -19,7 +19,7 @@
*/
#include "BLI_string.h"
#include <stddef.h>
#include <cstddef>
#include "ExtraHandler.h"

View File

@ -19,8 +19,8 @@
*/
#include "BLI_string.h"
#include <stddef.h>
#include <stdlib.h>
#include <cstddef>
#include <cstdlib>
#include <iostream>

View File

@ -21,7 +21,7 @@
#include <algorithm>
#if !defined(WIN32)
# include <stdint.h>
# include <cstdint>
#endif
/* COLLADABU_ASSERT, may be able to remove later */

View File

@ -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"

View File

@ -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>

View File

@ -14,7 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <string.h>
#include <cstring>
#include "MEM_guardedalloc.h"

View File

@ -21,7 +21,7 @@
* \ingroup nodes
*/
#include <limits.h>
#include <climits>
#include "DNA_node_types.h"