Always declare wxCStrData::As[W]Char() as being inline.

This fixes warnings with IRIX mipsPro and not only mingw32 and probably
doesn't do any harm with the other compilers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-02-28 11:09:07 +00:00
parent 54d6106853
commit 05d676f558

View File

@@ -225,19 +225,19 @@ public:
inline ~wxCStrData(); inline ~wxCStrData();
// methods defined inline below must be declared inline or mingw32 3.4.5 // AsWChar() and AsChar() can't be defined here as they use wxString and so
// warns about "<symbol> defined locally after being referenced with // must come after it and because of this won't be inlined when called from
// dllimport linkage" // wxString methods (without a lot of work to extract these wxString methods
#if wxUSE_UNICODE_WCHAR // from inside the class itself). But we still define them being inline
inline // below to let compiler inline them from elsewhere. And because of this we
#endif // must declare them as inline here because otherwise some compilers give
const wchar_t* AsWChar() const; // warnings about them, e.g. mingw32 3.4.5 warns about "<symbol> defined
// locally after being referenced with dllimport linkage" while IRIX
// mipsPro 7.4 warns about "function declared inline after being called".
inline const wchar_t* AsWChar() const;
operator const wchar_t*() const { return AsWChar(); } operator const wchar_t*() const { return AsWChar(); }
#if !wxUSE_UNICODE || wxUSE_UTF8_LOCALE_ONLY inline const char* AsChar() const;
inline
#endif
const char* AsChar() const;
const unsigned char* AsUnsignedChar() const const unsigned char* AsUnsignedChar() const
{ return (const unsigned char *) AsChar(); } { return (const unsigned char *) AsChar(); }
operator const char*() const { return AsChar(); } operator const char*() const { return AsChar(); }