Pass wxFont by const reference to wxStyledTextCtrl::StyleSetFont()
Since wxStyledTextCtrl::StyleSetFont does not change its 'font' parameter, it should be a constant reference so we can pass in temporary wxFont objects. Closes https://github.com/wxWidgets/wxWidgets/pull/321
This commit is contained in:
parent
1033fb048d
commit
ef85c41d0c
@ -4899,7 +4899,7 @@ public:
|
||||
|
||||
// Set style size, face, bold, italic, and underline attributes from
|
||||
// a wxFont's attributes.
|
||||
void StyleSetFont(int styleNum, wxFont& font);
|
||||
void StyleSetFont(int styleNum, const wxFont& font);
|
||||
|
||||
|
||||
|
||||
|
@ -4646,7 +4646,7 @@ wxFont wxStyledTextCtrl::StyleGetFont(int style) {
|
||||
|
||||
// Set style size, face, bold, italic, and underline attributes from
|
||||
// a wxFont's attributes.
|
||||
void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
|
||||
void wxStyledTextCtrl::StyleSetFont(int styleNum, const wxFont& font) {
|
||||
#ifdef __WXGTK__
|
||||
// Ensure that the native font is initialized
|
||||
int x, y;
|
||||
|
@ -352,7 +352,7 @@ wxFont wxStyledTextCtrl::StyleGetFont(int style) {
|
||||
|
||||
// Set style size, face, bold, italic, and underline attributes from
|
||||
// a wxFont's attributes.
|
||||
void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) {
|
||||
void wxStyledTextCtrl::StyleSetFont(int styleNum, const wxFont& font) {
|
||||
#ifdef __WXGTK__
|
||||
// Ensure that the native font is initialized
|
||||
int x, y;
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
|
||||
// Set style size, face, bold, italic, and underline attributes from
|
||||
// a wxFont's attributes.
|
||||
void StyleSetFont(int styleNum, wxFont& font);
|
||||
void StyleSetFont(int styleNum, const wxFont& font);
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user