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

Skip to content

Commit cc56def

Browse files
committed
Remove unused code
1 parent 3133213 commit cc56def

File tree

4 files changed

+2
-23
lines changed

4 files changed

+2
-23
lines changed

src/ft2font.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -725,11 +725,6 @@ FT_UInt FT2Font::get_char_index(FT_ULong charcode, bool fallback = false)
725725
return ft_get_char_index_or_warn(ft_object->get_face(), charcode, false);
726726
}
727727

728-
void FT2Font::get_cbox(FT_BBox &bbox)
729-
{
730-
FT_Glyph_Get_CBox(glyphs.back(), ft_glyph_bbox_subpixels, &bbox);
731-
}
732-
733728
void FT2Font::get_width_height(long *width, long *height)
734729
{
735730
*width = advance;

src/ft2font.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class FT2Image
3737

3838
void resize(long width, long height);
3939
void draw_bitmap(FT_Bitmap *bitmap, FT_Int x, FT_Int y);
40-
void write_bitmap(FILE *fp) const;
4140
void draw_rect(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1);
4241
void draw_rect_filled(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1);
4342

@@ -106,7 +105,6 @@ class FT2Font
106105
void get_glyph_name(unsigned int glyph_number, char *buffer, bool fallback);
107106
long get_name_index(char *name);
108107
FT_UInt get_char_index(FT_ULong charcode, bool fallback);
109-
void get_cbox(FT_BBox &bbox);
110108
PyObject* get_path();
111109
bool get_char_fallback_index(FT_ULong charcode, int& index) const;
112110

src/tri/_tri.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@ double XYZ::dot(const XYZ& other) const
133133
return x*other.x + y*other.y + z*other.z;
134134
}
135135

136-
double XYZ::length_squared() const
137-
{
138-
return x*x + y*y + z*z;
139-
}
140-
141136
XYZ XYZ::operator-(const XYZ& other) const
142137
{
143138
return XYZ(x - other.x, y - other.y, z - other.z);
@@ -182,12 +177,6 @@ ContourLine::ContourLine()
182177
: std::vector<XY>()
183178
{}
184179

185-
void ContourLine::insert_unique(iterator pos, const XY& point)
186-
{
187-
if (empty() || pos == end() || point != *pos)
188-
std::vector<XY>::insert(pos, point);
189-
}
190-
191180
void ContourLine::push_back(const XY& point)
192181
{
193182
if (empty() || point != back())

src/tri/_tri.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ struct XYZ
116116
XYZ(const double& x_, const double& y_, const double& z_);
117117
XYZ cross(const XYZ& other) const;
118118
double dot(const XYZ& other) const;
119-
double length_squared() const;
120119
XYZ operator-(const XYZ& other) const;
121120
friend std::ostream& operator<<(std::ostream& os, const XYZ& xyz);
122121

@@ -137,14 +136,12 @@ class BoundingBox
137136
};
138137

139138
/* A single line of a contour, which may be a closed line loop or an open line
140-
* strip. Identical adjacent points are avoided using insert_unique() and
141-
* push_back(), and a closed line loop should also not have identical first and
142-
* last points. */
139+
* strip. Identical adjacent points are avoided using push_back(), and a closed
140+
* line loop should also not have identical first and last points. */
143141
class ContourLine : public std::vector<XY>
144142
{
145143
public:
146144
ContourLine();
147-
void insert_unique(iterator pos, const XY& point);
148145
void push_back(const XY& point);
149146
void write() const;
150147
};

0 commit comments

Comments
 (0)