Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 730a943

Browse files
committed
Clean up headers in extensions
Either remove unused, or switch to more specific ones.
1 parent 35c1dd2 commit 730a943

13 files changed

+15
-17
lines changed

src/_backend_agg.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <Python.h>
66
#include "_backend_agg.h"
7-
#include "mplutils.h"
87

98
RendererAgg::RendererAgg(unsigned int width, unsigned int height, double dpi)
109
: width(width),

src/_backend_agg.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
#define MPL_BACKEND_AGG_H
88

99
#include <cmath>
10-
#include <vector>
1110
#include <algorithm>
1211

1312
#include "agg_alpha_mask_u8.h"
1413
#include "agg_conv_curve.h"
1514
#include "agg_conv_dash.h"
1615
#include "agg_conv_stroke.h"
16+
#include "agg_conv_transform.h"
1717
#include "agg_image_accessors.h"
18+
#include "agg_path_storage.h"
1819
#include "agg_pixfmt_amask_adaptor.h"
1920
#include "agg_pixfmt_gray.h"
2021
#include "agg_pixfmt_rgba.h"
@@ -25,7 +26,6 @@
2526
#include "agg_scanline_bin.h"
2627
#include "agg_scanline_p.h"
2728
#include "agg_scanline_storage_aa.h"
28-
#include "agg_scanline_storage_bin.h"
2929
#include "agg_scanline_u.h"
3030
#include "agg_span_allocator.h"
3131
#include "agg_span_converter.h"
@@ -34,7 +34,6 @@
3434
#include "agg_span_image_filter_rgba.h"
3535
#include "agg_span_interpolator_linear.h"
3636
#include "agg_span_pattern_rgba.h"
37-
#include "util/agg_color_conv_rgb8.h"
3837

3938
#include "_backend_agg_basic_types.h"
4039
#include "path_converters.h"

src/_backend_agg_basic_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "agg_color_rgba.h"
1010
#include "agg_math_stroke.h"
11+
#include "agg_trans_affine.h"
1112
#include "path_converters.h"
1213

1314
#include "py_adaptors.h"

src/_image_resample.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "agg_image_accessors.h"
77
#include "agg_path_storage.h"
88
#include "agg_pixfmt_gray.h"
9-
#include "agg_pixfmt_rgb.h"
109
#include "agg_pixfmt_rgba.h"
1110
#include "agg_renderer_base.h"
1211
#include "agg_renderer_scanline.h"

src/_path.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "agg_conv_curve.h"
1515
#include "agg_conv_stroke.h"
1616
#include "agg_conv_transform.h"
17-
#include "agg_path_storage.h"
1817
#include "agg_trans_affine.h"
1918

2019
#include "path_converters.h"

src/_tkagg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
// you can get it at https://python-pillow.org/
1111

1212
#include <Python.h>
13-
#include <memory>
1413
#include <new>
1514
#include <stdexcept>
1615
#include <string>
1716
#include <tuple>
18-
#include <vector>
1917

2018
#ifdef _WIN32
2119
#define WIN32_LEAN_AND_MEAN
@@ -48,6 +46,8 @@ static inline PyObject *PyErr_SetFromWindowsErr(int ierr) {
4846
#endif
4947

5048
#ifdef WIN32_DLL
49+
#include <vector>
50+
5151
#include <windows.h>
5252
#include <commctrl.h>
5353
#define PSAPI_VERSION 1

src/_ttconv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
66
Python wrapper for TrueType conversion library in ../ttconv.
77
*/
8+
89
#include <pybind11/pybind11.h>
9-
#include "mplutils.h"
1010
#include "pprdrv.h"
1111
#include <vector>
1212

src/array.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
#ifndef MPL_SCALAR_H
77
#define MPL_SCALAR_H
88

9+
#include <cstddef>
10+
#include <stdexcept>
11+
912
namespace array
1013
{
1114

src/ft2font.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#define PY_SSIZE_T_CLEAN
1010
#include <Python.h>
1111

12-
#include <vector>
13-
#include<set>
14-
#include <stdint.h>
12+
#include <cstdint>
13+
#include <set>
1514
#include <unordered_map>
15+
#include <vector>
1616

1717
extern "C" {
1818
#include <ft2build.h>

src/ft2font_wrapper.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
#include "ft2font.h"
33
#include "py_converters.h"
44
#include "py_exceptions.h"
5-
#include "numpy_cpp.h"
65

76
// From Python
87
#include <structmember.h>
98

109
#include <set>
11-
#include <algorithm>
1210

1311
static PyObject *convert_xys_to_array(std::vector<double> &xys)
1412
{

src/mplutils.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#define PY_SSIZE_T_CLEAN
88

99
#include <Python.h>
10-
#include <stdint.h>
1110

1211
#ifdef _POSIX_C_SOURCE
1312
# undef _POSIX_C_SOURCE

src/path_converters.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#define MPL_PATH_CONVERTERS_H
55

66
#include <cmath>
7-
#include <stdint.h>
8-
#include "agg_path_storage.h"
7+
#include <cstdint>
8+
99
#include "agg_clip_liang_barsky.h"
1010
#include "mplutils.h"
1111
#include "agg_conv_segmentator.h"

src/py_adaptors.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "numpy/arrayobject.h"
1414

15+
#include "agg_basics.h"
1516
#include "py_exceptions.h"
1617

1718
extern "C" {

0 commit comments

Comments
 (0)