diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index f9549ce070..302e8b3293 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -147,7 +147,7 @@ BOX2D STROKE_FONT::computeBoundingBox( const GLYPH& aGLYPH, const VECTOR2D& aGLY } -void STROKE_FONT::Draw( wxString aText, const VECTOR2D& aPosition, double aRotationAngle ) +void STROKE_FONT::Draw( const wxString& aText, const VECTOR2D& aPosition, double aRotationAngle ) { // Context needs to be saved before any transformations m_gal->Save(); diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index a3619783f2..afa8d7f61c 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -70,7 +70,7 @@ public: * @param aPosition is the text position in world coordinates. * @param aRotationAngle is the text rotation angle. */ - void Draw( wxString aText, const VECTOR2D& aPosition, double aRotationAngle ); + void Draw( const wxString& aText, const VECTOR2D& aPosition, double aRotationAngle ); /** * @brief Set the glyph size.