diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index 08e2282d8f..c47e33832b 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -104,7 +104,9 @@ wxWindow *wxDialogBase::CheckIfCanBeUsedAsParent(wxWindow *parent) const return NULL; } - if ( parent == this ) + // FIXME-VC6: this compiler requires an explicit const cast or it fails + // with error C2446 + if ( const_cast(parent) == this ) { // not sure if this can really happen but it doesn't hurt to guard // against this clearly invalid situation