Skip to content

Commit 276fade

Browse files
committed
Remove unused FT2Image.m_dirty
It is set in a few places, but never read.
1 parent d3da65f commit 276fade

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/ft2font.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ void throw_ft_error(std::string message, FT_Error error) {
6363
throw std::runtime_error(os.str());
6464
}
6565

66-
FT2Image::FT2Image() : m_dirty(true), m_buffer(NULL), m_width(0), m_height(0)
66+
FT2Image::FT2Image() : m_buffer(NULL), m_width(0), m_height(0)
6767
{
6868
}
6969

7070
FT2Image::FT2Image(unsigned long width, unsigned long height)
71-
: m_dirty(true), m_buffer(NULL), m_width(0), m_height(0)
71+
: m_buffer(NULL), m_width(0), m_height(0)
7272
{
7373
resize(width, height);
7474
}
@@ -102,8 +102,6 @@ void FT2Image::resize(long width, long height)
102102
if (numBytes && m_buffer) {
103103
memset(m_buffer, 0, numBytes);
104104
}
105-
106-
m_dirty = true;
107105
}
108106

109107
void FT2Image::draw_bitmap(FT_Bitmap *bitmap, FT_Int x, FT_Int y)
@@ -141,8 +139,6 @@ void FT2Image::draw_bitmap(FT_Bitmap *bitmap, FT_Int x, FT_Int y)
141139
} else {
142140
throw std::runtime_error("Unknown pixel mode");
143141
}
144-
145-
m_dirty = true;
146142
}
147143

148144
void
@@ -158,8 +154,6 @@ FT2Image::draw_rect_filled(unsigned long x0, unsigned long y0, unsigned long x1,
158154
m_buffer[i + j * m_width] = 255;
159155
}
160156
}
161-
162-
m_dirty = true;
163157
}
164158

165159
// ft_outline_decomposer should be passed to FT_Outline_Decompose.

src/ft2font.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class FT2Image
5757
}
5858

5959
private:
60-
bool m_dirty;
6160
unsigned char *m_buffer;
6261
unsigned long m_width;
6362
unsigned long m_height;

0 commit comments

Comments
 (0)