X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/088dd4c9c992a93639c8d9cbae591e70c0d7dcdb..3beb50e570f1b4f7a97c767677451ffc558fa22f:/include/wx/convauto.h diff --git a/include/wx/convauto.h b/include/wx/convauto.h index 551f1dc96c..bc514cea3b 100644 --- a/include/wx/convauto.h +++ b/include/wx/convauto.h @@ -14,8 +14,6 @@ #include "wx/strconv.h" #include "wx/fontenc.h" -#if wxUSE_WCHAR_T - // ---------------------------------------------------------------------------- // wxConvAuto: uses BOM to automatically detect input encoding // ---------------------------------------------------------------------------- @@ -75,6 +73,7 @@ private: // all currently recognized BOM values enum BOMType { + BOM_Unknown = -1, BOM_None, BOM_UTF32BE, BOM_UTF32LE, @@ -106,8 +105,11 @@ private: void InitFromBOM(BOMType bomType); // create the correct conversion object for the BOM present in the - // beginning of the buffer; adjust the buffer to skip the BOM if found - void InitFromInput(const char **src, size_t *len); + // beginning of the buffer + // + // return false if the buffer is too short to allow us to determine if we + // have BOM or not + bool InitFromInput(const char *src, size_t len); // adjust src and len to skip over the BOM (identified by m_bomType) at the // start of the buffer @@ -137,10 +139,8 @@ private: bool m_consumedBOM; - DECLARE_NO_ASSIGN_CLASS(wxConvAuto) + wxDECLARE_NO_ASSIGN_CLASS(wxConvAuto); }; -#endif // wxUSE_WCHAR_T - #endif // _WX_CONVAUTO_H_