switch to _EXPORTED_ hash maps to avoid VC++ warnings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-03-26 01:43:27 +00:00
parent c631abdae9
commit 9e7ed2b008
2 changed files with 24 additions and 24 deletions

View File

@@ -49,7 +49,7 @@ WX_DEFINE_LIST(wxArtProvidersList);
// Cache class - stores already requested bitmaps // Cache class - stores already requested bitmaps
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WX_DECLARE_STRING_HASH_MAP(wxBitmap, wxArtProviderBitmapsHash); WX_DECLARE_EXPORTED_STRING_HASH_MAP(wxBitmap, wxArtProviderBitmapsHash);
class WXDLLEXPORT wxArtProviderCache class WXDLLEXPORT wxArtProviderCache
{ {
@@ -59,7 +59,7 @@ public:
{ m_bitmapsHash[full_id] = bmp; } { m_bitmapsHash[full_id] = bmp; }
void Clear(); void Clear();
static wxString ConstructHashID(const wxArtID& id, static wxString ConstructHashID(const wxArtID& id,
const wxArtClient& client, const wxArtClient& client,
const wxSize& size); const wxSize& size);
@@ -140,7 +140,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL;
sm_cache->Clear(); sm_cache->Clear();
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }
@@ -170,7 +170,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL;
bmp = node->GetData()->CreateBitmap(id, client, size); bmp = node->GetData()->CreateBitmap(id, client, size);
if ( bmp.Ok() ) if ( bmp.Ok() )
{ {
if ( size != wxDefaultSize && if ( size != wxDefaultSize &&
(bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) ) (bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) )
{ {
wxImage img = bmp.ConvertToImage(); wxImage img = bmp.ConvertToImage();

View File

@@ -147,7 +147,7 @@ static inline wxString ExtractNotLang(const wxString& langFull)
// This is a "low-level" class and is used only by wxMsgCatalog // This is a "low-level" class and is used only by wxMsgCatalog
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WX_DECLARE_STRING_HASH_MAP(wxString, wxMessagesHash) WX_DECLARE_EXPORTED_STRING_HASH_MAP(wxString, wxMessagesHash)
class wxMsgCatalogFile class wxMsgCatalogFile
{ {
@@ -194,7 +194,7 @@ private:
const char *StringAtOfs(wxMsgTableEntry *pTable, size_t32 index) const const char *StringAtOfs(wxMsgTableEntry *pTable, size_t32 index) const
{ return (const char *)(m_pData + Swap(pTable[index].ofsString)); } { return (const char *)(m_pData + Swap(pTable[index].ofsString)); }
wxString GetCharset() const; wxString GetCharset() const;
// utility functions // utility functions
@@ -430,7 +430,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash, bool convertEncoding) cons
hash[key] = wxString(StringAtOfs(m_pTransTable, i), inputConv); hash[key] = wxString(StringAtOfs(m_pTransTable, i), inputConv);
#else #else
if ( convertEncoding ) if ( convertEncoding )
hash[key] = hash[key] =
wxString(inputConv.cMB2WC(StringAtOfs(m_pTransTable, i)), wxString(inputConv.cMB2WC(StringAtOfs(m_pTransTable, i)),
wxConvLocal); wxConvLocal);
else else
@@ -457,7 +457,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash, bool convertEncoding) cons
wxFontEncodingArray a = wxEncodingConverter::GetPlatformEquivalents(enc); wxFontEncodingArray a = wxEncodingConverter::GetPlatformEquivalents(enc);
if (a[0] == enc) if (a[0] == enc)
// no conversion needed, locale uses native encoding // no conversion needed, locale uses native encoding
convertEncoding = FALSE; convertEncoding = FALSE;
if (a.GetCount() == 0) if (a.GetCount() == 0)
// we don't know common equiv. under this platform // we don't know common equiv. under this platform
convertEncoding = FALSE; convertEncoding = FALSE;
@@ -473,7 +473,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash, bool convertEncoding) cons
for (size_t i = 0; i < m_numStrings; i++) for (size_t i = 0; i < m_numStrings; i++)
{ {
wxString key(StringAtOfs(m_pOrigTable, i)); wxString key(StringAtOfs(m_pOrigTable, i));
hash[key] = hash[key] =
converter.Convert(wxString(StringAtOfs(m_pTransTable, i))); converter.Convert(wxString(StringAtOfs(m_pTransTable, i)));
} }
} }
@@ -495,7 +495,7 @@ wxString wxMsgCatalogFile::GetCharset() const
{ {
// first, find encoding header: // first, find encoding header:
const char *hdr = StringAtOfs(m_pOrigTable, 0); const char *hdr = StringAtOfs(m_pOrigTable, 0);
if ( hdr == NULL || hdr[0] != 0 ) if ( hdr == NULL || hdr[0] != 0 )
{ {
// not supported by this catalog, does not have correct header // not supported by this catalog, does not have correct header
return wxEmptyString; return wxEmptyString;
@@ -507,19 +507,19 @@ wxString wxMsgCatalogFile::GetCharset() const
if ( pos == wxNOT_FOUND ) if ( pos == wxNOT_FOUND )
{ {
// incorrectly filled Content-Type header // incorrectly filled Content-Type header
return wxEmptyString; return wxEmptyString;
} }
size_t n = pos + 34; /*strlen("Content-Type: text/plain; charset=")*/ size_t n = pos + 34; /*strlen("Content-Type: text/plain; charset=")*/
while ( header[n] != wxT('\n') ) while ( header[n] != wxT('\n') )
charset << header[n++]; charset << header[n++];
if ( charset == wxT("CHARSET") ) if ( charset == wxT("CHARSET") )
{ {
// "CHARSET" is not valid charset, but lazy translator // "CHARSET" is not valid charset, but lazy translator
return wxEmptyString; return wxEmptyString;
} }
return charset; return charset;
} }
@@ -527,13 +527,13 @@ wxString wxMsgCatalogFile::GetCharset() const
// wxMsgCatalog class // wxMsgCatalog class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName, bool wxMsgCatalog::Load(const wxChar *szDirPrefix, const wxChar *szName,
bool bConvertEncoding) bool bConvertEncoding)
{ {
wxMsgCatalogFile file; wxMsgCatalogFile file;
m_name = szName; m_name = szName;
if ( file.Load(szDirPrefix, szName) ) if ( file.Load(szDirPrefix, szName) )
{ {
file.FillHash(m_messages, bConvertEncoding); file.FillHash(m_messages, bConvertEncoding);
@@ -1196,7 +1196,7 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
break; break;
} }
} }
#elif defined(__WIN32__) #elif defined(__WIN32__)
LCID lcid = GetUserDefaultLCID(); LCID lcid = GetUserDefaultLCID();
if ( lcid != 0 ) if ( lcid != 0 )
@@ -1397,7 +1397,7 @@ const wxChar *wxLocale::GetString(const wxChar *szOrigString,
const wxChar *pszTrans = NULL; const wxChar *pszTrans = NULL;
wxMsgCatalog *pMsgCat; wxMsgCatalog *pMsgCat;
if ( szDomain != NULL ) if ( szDomain != NULL )
{ {
pMsgCat = FindCatalog(szDomain); pMsgCat = FindCatalog(szDomain);
@@ -1405,10 +1405,10 @@ const wxChar *wxLocale::GetString(const wxChar *szOrigString,
if ( pMsgCat != NULL ) if ( pMsgCat != NULL )
pszTrans = pMsgCat->GetString(szOrigString); pszTrans = pMsgCat->GetString(szOrigString);
} }
else else
{ {
// search in all domains // search in all domains
for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext )
{ {
pszTrans = pMsgCat->GetString(szOrigString); pszTrans = pMsgCat->GetString(szOrigString);
if ( pszTrans != NULL ) // take the first found if ( pszTrans != NULL ) // take the first found
@@ -1416,10 +1416,10 @@ const wxChar *wxLocale::GetString(const wxChar *szOrigString,
} }
} }
if ( pszTrans == NULL ) if ( pszTrans == NULL )
{ {
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
if ( !NoTransErr::Suppress() ) if ( !NoTransErr::Suppress() )
{ {
NoTransErr noTransErr; NoTransErr noTransErr;
@@ -1447,7 +1447,7 @@ wxMsgCatalog *wxLocale::FindCatalog(const wxChar *szDomain) const
{ {
// linear search in the linked list // linear search in the linked list
wxMsgCatalog *pMsgCat; wxMsgCatalog *pMsgCat;
for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext ) for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext )
{ {
if ( wxStricmp(pMsgCat->GetName(), szDomain) == 0 ) if ( wxStricmp(pMsgCat->GetName(), szDomain) == 0 )
return pMsgCat; return pMsgCat;
@@ -2321,7 +2321,7 @@ void wxLocale::InitLanguagesDB()
LNG(wxLANGUAGE_YORUBA, "yo" , 0 , 0 , "Yoruba") LNG(wxLANGUAGE_YORUBA, "yo" , 0 , 0 , "Yoruba")
LNG(wxLANGUAGE_ZHUANG, "za" , 0 , 0 , "Zhuang") LNG(wxLANGUAGE_ZHUANG, "za" , 0 , 0 , "Zhuang")
LNG(wxLANGUAGE_ZULU, "zu" , 0 , 0 , "Zulu") LNG(wxLANGUAGE_ZULU, "zu" , 0 , 0 , "Zulu")
}; };
#undef LNG #undef LNG