From 325408f062bfe5c99159f66f0983d6bd344cea3c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Jan 2020 14:03:54 +0100 Subject: [PATCH] Make wxGridCellAttr ctor taking a single argument explicit There doesn't seem to be any reason for allowing to implicitly convert wxGridCellAttr pointer to wxGridCellAttr object. --- docs/changes.txt | 2 ++ include/wx/generic/grid.h | 7 +++---- interface/wx/grid.h | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index ffb05b5c70..7d8621447f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -146,6 +146,8 @@ Changes in behaviour which may result in build errors - wxIntProperty::DoValidation() and wxFloatProperty::DoValidation() are no longer public since they are helpers intended for internal use only. +- wxGridCellAttr ctor taking wxGridCellAttr pointer is now explicit. + 3.1.4: (released ????-??-??) ---------------------------- diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 529523c471..3792d96bad 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -428,16 +428,15 @@ public: Merged }; - // ctors - wxGridCellAttr(wxGridCellAttr *attrDefault = NULL) + // default ctor + explicit wxGridCellAttr(wxGridCellAttr *attrDefault = NULL) { Init(attrDefault); SetAlignment(wxALIGN_INVALID, wxALIGN_INVALID); } - // VZ: considering the number of members wxGridCellAttr has now, this ctor - // seems to be pretty useless... may be we should just remove it? + // ctor setting the most common attributes wxGridCellAttr(const wxColour& colText, const wxColour& colBack, const wxFont& font, diff --git a/interface/wx/grid.h b/interface/wx/grid.h index 57cde96b11..12d3330e75 100644 --- a/interface/wx/grid.h +++ b/interface/wx/grid.h @@ -912,7 +912,8 @@ public: /** Default constructor. */ - wxGridCellAttr(wxGridCellAttr* attrDefault = NULL); + explicit wxGridCellAttr(wxGridCellAttr* attrDefault = NULL); + /** Constructor specifying some of the often used attributes. */