]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
re-renamed DoCreate() to XmDoCreateTLW() to avoid virtual function hiding in other...
[wxWidgets.git] / src / common / intl.cpp
index d47dbea5b1f4954a7647c59087c9cec3939a062a..d7d4c60fdc7d1bc9b9f67d0ae93720369b37fdd6 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "intl.h"
-#endif
-
 #if defined(__BORLAND__) && !defined(__WXDEBUG__)
     // There's a bug in Borland's compiler that breaks wxLocale with -O2,
     // so make sure that flag is not used for this file:
@@ -506,7 +502,7 @@ private:
     wxPluralFormsNodePtr m_plural;
 };
 
-wxDEFINE_SCOPED_PTR_TYPE(wxPluralFormsCalculator);
+wxDEFINE_SCOPED_PTR_TYPE(wxPluralFormsCalculator)
 
 void wxPluralFormsCalculator::init(wxPluralFormsToken::Number nplurals,
                                    wxPluralFormsNode* plural)
@@ -1136,13 +1132,16 @@ bool wxMsgCatalogFile::Load(const wxChar *szDirPrefix, const wxChar *szName,
     return false;
 
   // get the file size (assume it is less than 4Gb...)
-  wxFileOffset nSize = fileMsg.Length();
-  if ( nSize == wxInvalidOffset )
+  wxFileOffset lenFile = fileMsg.Length();
+  if ( lenFile == wxInvalidOffset )
     return false;
 
+  size_t nSize = wx_truncate_cast(size_t, lenFile);
+  wxASSERT_MSG( nSize == lenFile, _T("message catalog bigger than 4GB?") );
+
   // read the whole file in memory
   m_pData = new size_t8[nSize];
-  if ( fileMsg.Read(m_pData, (size_t)nSize) != nSize ) {
+  if ( fileMsg.Read(m_pData, nSize) != nSize ) {
     wxDELETEA(m_pData);
     return false;
   }
@@ -1416,7 +1415,7 @@ const wxChar *wxMsgCatalog::GetString(const wxChar *sz, size_t n) const
 
 #include "wx/arrimpl.cpp"
 WX_DECLARE_EXPORTED_OBJARRAY(wxLanguageInfo, wxLanguageInfoArray);
-WX_DEFINE_OBJARRAY(wxLanguageInfoArray);
+WX_DEFINE_OBJARRAY(wxLanguageInfoArray)
 
 wxLanguageInfoArray *wxLocale::ms_languagesDB = NULL;
 
@@ -3540,7 +3539,7 @@ void wxLocale::InitLanguagesDB()
    LNG(wxLANGUAGE_ZHUANG,                     "za"   , 0              , 0                                 , "Zhuang")
    LNG(wxLANGUAGE_ZULU,                       "zu"   , 0              , 0                                 , "Zulu")
 
-};
+}
 #undef LNG
 
 // --- --- --- generated code ends here --- --- ---