Fix CID 1386084 (Uninitialized scalar variable)

The set_font method used the uninitialized member variable resolution_.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-04-26 18:02:43 +02:00
parent e2135de022
commit b87fc523ca

View File

@ -90,7 +90,8 @@ Pix* CairoARGB32ToPixFormat(cairo_surface_t *surface) {
StringRenderer::StringRenderer(const std::string& font_desc, int page_width,
int page_height)
: page_width_(page_width),
: font_(font_desc),
page_width_(page_width),
page_height_(page_height),
h_margin_(50),
v_margin_(50),
@ -118,7 +119,6 @@ StringRenderer::StringRenderer(const std::string& font_desc, int page_width,
total_chars_(0),
font_index_(0),
last_offset_(0) {
set_font(font_desc);
set_resolution(kDefaultOutputResolution);
}