diff --git a/include/wx/propgrid/editors.h b/include/wx/propgrid/editors.h index c9c8dddd31..f224386661 100644 --- a/include/wx/propgrid/editors.h +++ b/include/wx/propgrid/editors.h @@ -428,7 +428,7 @@ public: virtual bool DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ) = 0; - void SetValue( wxVariant value ) + void SetValue( const wxVariant& value ) { m_value = value; } diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 77d8c4b09a..ad3be58c15 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -1736,7 +1736,7 @@ public: // Helper function (for wxPython bindings and such) for settings protected // m_value. - void SetValuePlain( wxVariant value ) + void SetValuePlain( const wxVariant& value ) { m_value = value; } diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 68f6eab42c..068b08cb3f 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1299,7 +1299,7 @@ public: // changed after the function returns (with true as return value). // ValueChangeInEvent() must be used if you wish the application to be // able to use wxEVT_PG_CHANGING to potentially veto the given value. - void ValueChangeInEvent( wxVariant variant ) + void ValueChangeInEvent( const wxVariant& variant ) { m_changeInEventValue = variant; m_iFlags |= wxPG_FL_VALUE_CHANGE_IN_EVENT; @@ -2203,7 +2203,7 @@ public: m_propertyName = p->GetName(); } - void SetPropertyValue( wxVariant value ) + void SetPropertyValue( const wxVariant& value ) { m_value = value; } diff --git a/include/wx/richtext/richtextsymboldlg.h b/include/wx/richtext/richtextsymboldlg.h index 40f5621ae4..8c966545df 100644 --- a/include/wx/richtext/richtextsymboldlg.h +++ b/include/wx/richtext/richtextsymboldlg.h @@ -137,16 +137,16 @@ public: ////@begin wxSymbolPickerDialog member function declarations wxString GetFontName() const { return m_fontName ; } - void SetFontName(wxString value) { m_fontName = value ; } + void SetFontName(const wxString& value) { m_fontName = value; } bool GetFromUnicode() const { return m_fromUnicode ; } void SetFromUnicode(bool value) { m_fromUnicode = value ; } wxString GetNormalTextFontName() const { return m_normalTextFontName ; } - void SetNormalTextFontName(wxString value) { m_normalTextFontName = value ; } + void SetNormalTextFontName(const wxString& value) { m_normalTextFontName = value; } wxString GetSymbol() const { return m_symbol ; } - void SetSymbol(wxString value) { m_symbol = value ; } + void SetSymbol(const wxString& value) { m_symbol = value; } /// Retrieves bitmap resources wxBitmap GetBitmapResource( const wxString& name ); diff --git a/samples/opengl/pyramid/mathstuff.cpp b/samples/opengl/pyramid/mathstuff.cpp index 754a99663d..17721f8dbc 100644 --- a/samples/opengl/pyramid/mathstuff.cpp +++ b/samples/opengl/pyramid/mathstuff.cpp @@ -52,7 +52,7 @@ double MyDistance(const myVec3& v1, const myVec3& v2) } // Angle between two normalized vectors, in radians -double AngleBetween(myVec3 v1, myVec3 v2) +double AngleBetween(const myVec3& v1, const myVec3& v2) { double angle = MyDot(v1, v2); // Prevent issues due to numerical precision diff --git a/samples/opengl/pyramid/mathstuff.h b/samples/opengl/pyramid/mathstuff.h index 538ea13210..578d206c3f 100644 --- a/samples/opengl/pyramid/mathstuff.h +++ b/samples/opengl/pyramid/mathstuff.h @@ -56,7 +56,7 @@ myVec3 MyCross(const myVec3& v1, const myVec3& v2); double MyDistance(const myVec3& v1, const myVec3& v2); // Angle between two normalized vectors, in radians -double AngleBetween(myVec3 v1, myVec3 v2); +double AngleBetween(const myVec3& v1, const myVec3& v2); // Matrix 4x4 by 4x1 multiplication myVec4 MyMatMul4x1(const double *m1, const myVec4& v); diff --git a/samples/opengl/pyramid/oglstuff.cpp b/samples/opengl/pyramid/oglstuff.cpp index b2d2eafb5b..1f085a7ea8 100644 --- a/samples/opengl/pyramid/oglstuff.cpp +++ b/samples/opengl/pyramid/oglstuff.cpp @@ -305,14 +305,14 @@ void myOGLShaders::AddCode(const GLchar* shaString, GLenum shaType) m_shaCode.push_back(sv); } -void myOGLShaders::AddAttrib(std::string name) +void myOGLShaders::AddAttrib(const std::string& name) { shaVars sv = {0, name}; //We will set the location later m_shaAttrib.push_back(sv); // We don't check the max number of attribute locations (usually 16) } -void myOGLShaders::AddUnif(std::string name) +void myOGLShaders::AddUnif(const std::string& name) { shaVars sv = {0, name}; m_shaUnif.push_back(sv); @@ -333,7 +333,7 @@ void myOGLShaders::SetAttribLocations() } } -GLuint myOGLShaders::GetAttribLoc(std::string name) +GLuint myOGLShaders::GetAttribLoc(const std::string& name) { for (shaVars_v::iterator it = m_shaAttrib.begin(); it != m_shaAttrib.end(); ++it) { @@ -362,7 +362,7 @@ bool myOGLShaders::AskUnifLocations() return true; } -GLuint myOGLShaders::GetUnifLoc(std::string name) +GLuint myOGLShaders::GetUnifLoc(const std::string& name) { for (shaVars_v::iterator it = m_shaUnif.begin(); it != m_shaUnif.end(); ++it) { diff --git a/samples/opengl/pyramid/oglstuff.h b/samples/opengl/pyramid/oglstuff.h index 010920c2ec..7163c6c750 100644 --- a/samples/opengl/pyramid/oglstuff.h +++ b/samples/opengl/pyramid/oglstuff.h @@ -109,10 +109,10 @@ public: void CleanUp(); void AddCode(const GLchar* shaString, GLenum shaType); - void AddAttrib(std::string name); - void AddUnif(std::string name); - GLuint GetAttribLoc(std::string name); - GLuint GetUnifLoc(std::string name); + void AddAttrib(const std::string& name); + void AddUnif(const std::string& name); + GLuint GetAttribLoc(const std::string& name); + GLuint GetUnifLoc(const std::string& name); // Disable generic vertex attribute array void DisableGenericVAA();