summaryrefslogtreecommitdiffstats
path: root/src/display/nr-svgfonts.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-15 10:46:15 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2018-06-18 12:27:01 +0000
commitf4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43 (patch)
tree7c6044fd3a17a2665841959dac9b3b2110b27924 /src/display/nr-svgfonts.cpp
parentRun clang-tidy’s modernize-use-override pass. (diff)
downloadinkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.tar.gz
inkscape-f4349fb3e45bd44cef0e2b69af4c9b4cf35dcf43.zip
Run clang-tidy’s modernize-use-nullptr pass.
This replaces all NULL or 0 with nullptr when assigned to or returned as a pointer.
Diffstat (limited to 'src/display/nr-svgfonts.cpp')
-rw-r--r--src/display/nr-svgfonts.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/display/nr-svgfonts.cpp b/src/display/nr-svgfonts.cpp
index c3354bc0b..e2b112c1b 100644
--- a/src/display/nr-svgfonts.cpp
+++ b/src/display/nr-svgfonts.cpp
@@ -79,7 +79,7 @@ UserFont::UserFont(SvgFont* instance){
cairo_user_font_face_set_render_glyph_func (this->face, font_render_glyph_cb);
cairo_user_font_face_set_text_to_glyphs_func(this->face, font_text_to_glyphs_cb);
- cairo_font_face_set_user_data (this->face, &key, (void*)instance, (cairo_destroy_func_t) NULL);
+ cairo_font_face_set_user_data (this->face, &key, (void*)instance, (cairo_destroy_func_t) nullptr);
}
//******************************//
@@ -87,8 +87,8 @@ UserFont::UserFont(SvgFont* instance){
//******************************//
SvgFont::SvgFont(SPFont* spfont){
this->font = spfont;
- this->missingglyph = NULL;
- this->userfont = NULL;
+ this->missingglyph = nullptr;
+ this->userfont = nullptr;
}
cairo_status_t
@@ -191,8 +191,8 @@ SvgFont::scaled_font_text_to_glyphs (cairo_scaled_font_t */*scaled_font*/,
//We use that info to allocate memory for the glyphs
*glyphs = (cairo_glyph_t*) malloc(count*sizeof(cairo_glyph_t));
- char* previous_unicode = NULL; //This is used for kerning
- gchar* previous_glyph_name = NULL; //This is used for kerning
+ char* previous_unicode = nullptr; //This is used for kerning
+ gchar* previous_glyph_name = nullptr; //This is used for kerning
count=0;
double x=0, y=0;//These vars store the position of the glyph within the rendered string
@@ -312,7 +312,7 @@ SvgFont::scaled_font_render_glyph (cairo_scaled_font_t */*scaled_font*/,
if (glyph > this->glyphs.size()) return CAIRO_STATUS_SUCCESS;//TODO: this is an error!
- SPObject *node = NULL;
+ SPObject *node = nullptr;
if (glyph == glyphs.size()){
if (!missingglyph) {
return CAIRO_STATUS_SUCCESS;
@@ -370,7 +370,7 @@ SvgFont::scaled_font_render_glyph (cairo_scaled_font_t */*scaled_font*/,
SPPath *path = dynamic_cast<SPPath *>(item);
if (path) {
SPShape *shape = dynamic_cast<SPShape *>(item);
- g_assert(shape != NULL);
+ g_assert(shape != nullptr);
pathv = shape->_curve->get_pathvector();
pathv = flip_coordinate_system(spfont, pathv);
this->render_glyph_path(cr, &pathv);
@@ -405,7 +405,7 @@ SvgFont::get_font_face(){
void SvgFont::refresh(){
this->glyphs.clear();
delete this->userfont;
- this->userfont = NULL;
+ this->userfont = nullptr;
}
double SvgFont::units_per_em() {