From: Vadim Zeitlin Date: Mon, 21 Jan 2002 15:52:03 +0000 (+0000) Subject: added an explicit accessor to query the default key value X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/50e42404fb498c5973f8ce500bc97e2906b97d64 added an explicit accessor to query the default key value git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msw/registry.h b/include/wx/msw/registry.h index 76980b5f64..5e995ad25b 100644 --- a/include/wx/msw/registry.h +++ b/include/wx/msw/registry.h @@ -168,8 +168,11 @@ public: wxRegKey& operator=(long lValue) { SetValue(NULL, lValue); return *this; } - // conversion operators query the default value of the key - operator wxString() const; + // query the default value of the key: implicitly or explicitly + wxString QueryDefaultValue() const; + operator wxString() const { return QueryDefaultValue(); } + + // named values // set the string value bool SetValue(const wxChar *szValue, const wxString& strValue); diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 34e7c891a5..ca0f62ace8 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -930,7 +930,7 @@ bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue) return FALSE; } -wxRegKey::operator wxString() const +wxString wxRegKey::QueryDefaultValue() const { wxString str; QueryValue(NULL, str);