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:
HasheeLeo 2016-09-06 13:53:45 +05:00 committed by Vadim Zeitlin
parent 1033fb048d
commit ef85c41d0c
4 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);