From 541aa821800536b6e265d415de8c1ed9a304f1c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 11 Jun 2007 19:59:11 +0000 Subject: [PATCH] fixed VC6 warnings about non-dllexported members in dllexported classes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/buffer.h | 4 ++-- include/wx/string.h | 20 +++++++++++++++----- include/wx/stringimpl.h | 6 +++--- include/wx/strvararg.h | 9 +++++++++ 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/include/wx/buffer.h b/include/wx/buffer.h index ab41f551db..8e7fd8dbb1 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -150,7 +150,7 @@ private: bool m_owned; }; -class WXDLLIMPEXP_BASE wxCharBuffer : public wxCharTypeBuffer +class wxCharBuffer : public wxCharTypeBuffer { public: typedef wxCharTypeBuffer wxCharTypeBufferBase; @@ -165,7 +165,7 @@ public: }; #if wxUSE_WCHAR_T -class WXDLLIMPEXP_BASE wxWCharBuffer : public wxCharTypeBuffer +class wxWCharBuffer : public wxCharTypeBuffer { public: typedef wxCharTypeBuffer wxCharTypeBufferBase; diff --git a/include/wx/string.h b/include/wx/string.h index 86eb7eef96..d40abcea3c 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -639,7 +639,7 @@ public: private: \ underlying_iterator m_cur - class const_iterator; + class WXDLLIMPEXP_BASE const_iterator; #if wxUSE_UNICODE_UTF8 // NB: In UTF-8 build, (non-const) iterator needs to keep reference @@ -656,7 +656,7 @@ public: // string and traversing it in wxUniCharRef::operator=(). Head of the // list is stored in wxString. (FIXME-UTF8) - class iterator + class WXDLLIMPEXP_BASE iterator { WX_STR_ITERATOR_IMPL(iterator, wxChar*, wxUniCharRef); @@ -687,7 +687,7 @@ public: friend class const_iterator; }; - class const_iterator + class WXDLLIMPEXP_BASE const_iterator { // NB: reference_type is intentionally value, not reference, the character // may be encoded differently in wxString data: @@ -726,7 +726,7 @@ public: #else // !wxUSE_UNICODE_UTF8 - class iterator + class WXDLLIMPEXP_BASE iterator { WX_STR_ITERATOR_IMPL(iterator, wxChar*, wxUniCharRef); @@ -753,7 +753,7 @@ public: friend class const_iterator; }; - class const_iterator + class WXDLLIMPEXP_BASE const_iterator { // NB: reference_type is intentionally value, not reference, the character // may be encoded differently in wxString data: @@ -2520,6 +2520,12 @@ private: private: wxStringImpl m_impl; +#ifdef __VISUALC__ + // "struct 'ConvertedBuffer' needs to have dll-interface to be used by + // clients of class 'wxString'" - this is private, we don't care + #pragma warning (disable:4251) +#endif + // buffers for compatibility conversion from (char*)c_str() and // (wchar_t*)c_str(): // FIXME-UTF8: bechmark various approaches to keeping compatibility buffers @@ -2548,6 +2554,10 @@ private: ConvertedBuffer m_convertedToWChar; #endif +#ifdef __VISUALC__ + #pragma warning (default:4251) +#endif + #if wxUSE_UNICODE_UTF8 // FIXME-UTF8: (try to) move this elsewhere (TLS) or solve differently // assigning to character pointer to by wxString::interator may diff --git a/include/wx/stringimpl.h b/include/wx/stringimpl.h index 1a581de5d1..4669549eb4 100644 --- a/include/wx/stringimpl.h +++ b/include/wx/stringimpl.h @@ -263,9 +263,9 @@ public: // we need to declare const_iterator in wxStringImpl scope, the friend // declaration inside iterator class itself is not enough, or at least not // for g++ 3.4 (g++ 4 is ok) - class const_iterator; + class WXDLLIMPEXP_BASE const_iterator; - class iterator + class WXDLLIMPEXP_BASE iterator { WX_DEFINE_STRINGIMPL_ITERATOR(iterator, wxStringCharType&, @@ -274,7 +274,7 @@ public: friend class const_iterator; }; - class const_iterator + class WXDLLIMPEXP_BASE const_iterator { public: const_iterator(iterator i) : m_ptr(i.m_ptr) { } diff --git a/include/wx/strvararg.h b/include/wx/strvararg.h index 7c7ae7ae82..ee87423fa7 100644 --- a/include/wx/strvararg.h +++ b/include/wx/strvararg.h @@ -150,8 +150,17 @@ private: #endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY private: +#ifdef __VISUALC__ + // "struct 'ConvertedBuffer' needs to have dll-interface to be used by + // clients of class 'wxString'" - this is private, we don't care + #pragma warning (disable:4251) +#endif wxCharBuffer m_char; wxWCharBuffer m_wchar; +#ifdef __VISUALC__ + #pragma warning (default:4251) +#endif + // NB: we can use a pointer here, because wxFormatString is only used // as function argument, so it has shorter life than the string // passed to the ctor -- 2.47.2