X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94cd7b004d3587fdec8f91dea7f770c58f4f84db..58ce18f2fdadecffb21e27555115af708325cf18:/include/wx/any.h diff --git a/include/wx/any.h b/include/wx/any.h index 03453ead82..092e71078d 100644 --- a/include/wx/any.h +++ b/include/wx/any.h @@ -787,8 +787,9 @@ public: @remarks You cannot reliably test whether two wxAnys are of same value type by simply comparing return values - of wxAny::GetType(). Instead use - wxAnyValueType::CheckType() template function. + of wxAny::GetType(). Instead, use wxAny::HasSameType(). + + @see HasSameType() */ const wxAnyValueType* GetType() const { @@ -796,7 +797,16 @@ public: } /** - Tests if wxAny is null (that is, whether there is data). + Returns @true if this and another wxAny have the same + value type. + */ + bool HasSameType(const wxAny& other) const + { + return GetType()->IsSameType(other.GetType()); + } + + /** + Tests if wxAny is null (that is, whether there is no data). */ bool IsNull() const {