libs/render/src/eu/render/font.cc

 

warning: function 'construct_character_rects' can be made static or moved into an anonymous namespace to enforce internal linkage

[misc-use-internal-linkage]

libs/render/src/eu/render/font.cc 49 : 5

   48 |     std::pair<Rect, Rect>
      |     static 
   49 |     construct_character_rects
      |     ^
 

warning: variable 'dest' of type 'std:: shared_ptr<Glyph>' can be declared 'const'

[misc-const-correctness]

libs/render/src/eu/render/font.cc 186 : 13

  186 |             std::shared_ptr<Glyph> dest
      |             ^
      |                                    const 
 

warning: use std:: make_shared instead

[modernize-make-shared]

libs/render/src/eu/render/font.cc 186 : 36

  186 |             std::shared_ptr<Glyph> dest
      |                                    ^~~~
  187 |             (
  188 |                 new Glyph
      |                 ~~~~~~~~~
  189 |                 (
      |                 ~
  190 |                     sprite_and_texture_rects.first,
  191 |                     sprite_and_texture_rects.second,
  192 |                     src_char.code_point,
  193 |                     static_cast<float>(src_char.advance) / src_char.size
  194 |                 )
      |                 ~
 

warning: method 'draw_background' can be made static

[readability-convert-member-functions-to-static]

libs/render/src/eu/render/font.cc 215 : 19

  215 |     DrawableFont::draw_background
      |                   ^
  216 |     (
  217 |         SpriteBatch* renderer,
  218 |         float alpha,
  219 |         const Rect& where
  220 |     ) const
      |       ~~~~~
 

warning: member 'font' of type 'const DrawableFont &' is a reference

[cppcoreguidelines-avoid-const-or-ref-data-members]

libs/render/src/eu/render/font.cc 277 : 29

  277 |         const DrawableFont& font;
      |                             ^
 

warning: preprocessor condition is always 'false', consider removing both the condition and its contents

[readability-avoid-unconditional-preprocessor-if]

libs/render/src/eu/render/font.cc 312 : 2

  312 | #if 0
      |  ^

warning: variable 'ch' of type 'std:: shared_ptr<Glyph>' can be declared 'const'

[misc-const-correctness]

libs/render/src/eu/render/font.cc 363 : 17

  363 |                 std::shared_ptr<Glyph> ch = it->second;
      |                 ^
      |                                        const 

warning: function 'get_offset' can be made static or moved into an anonymous namespace to enforce internal linkage

[misc-use-internal-linkage]

libs/render/src/eu/render/font.cc 468 : 5

  467 |     v2
      |     static 
  468 |     get_offset(Align alignment, const Rect& extent)
      |     ^