From 6df6e35a3eae74404f15f8f7c09ce19c29f47b4a Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Sun, 29 Oct 2006 07:37:09 +0000 Subject: [PATCH] Fixes for semicolons, commas and wxSTRING_MAXLEN from Wlodek Szafran. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/richtext/richtextprint.h | 2 +- src/common/tarstrm.cpp | 4 ++-- src/xml/xml.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/wx/richtext/richtextprint.h b/include/wx/richtext/richtextprint.h index 20dc9ecbcc..4a45c4e343 100644 --- a/include/wx/richtext/richtextprint.h +++ b/include/wx/richtext/richtextprint.h @@ -26,7 +26,7 @@ enum wxRichTextOddEvenPage { wxRICHTEXT_PAGE_ODD, wxRICHTEXT_PAGE_EVEN, - wxRICHTEXT_PAGE_ALL, + wxRICHTEXT_PAGE_ALL }; // Header/footer text locations diff --git a/src/common/tarstrm.cpp b/src/common/tarstrm.cpp index a677a8a0db..18412660d7 100644 --- a/src/common/tarstrm.cpp +++ b/src/common/tarstrm.cpp @@ -61,7 +61,7 @@ enum { }; enum { - TAR_BLOCKSIZE = 512, + TAR_BLOCKSIZE = 512 }; // checksum type @@ -154,7 +154,7 @@ private: static void check(); }; -wxDEFINE_SCOPED_PTR_TYPE(wxTarHeaderBlock); +wxDEFINE_SCOPED_PTR_TYPE(wxTarHeaderBlock) // A table giving the field names and offsets in a tar header block const wxTarField wxTarHeaderBlock::fields[] = diff --git a/src/xml/xml.cpp b/src/xml/xml.cpp index 6a76beb7c6..4c94c15431 100644 --- a/src/xml/xml.cpp +++ b/src/xml/xml.cpp @@ -414,7 +414,7 @@ bool wxXmlDocument::Save(const wxString& filename, int indentstep) const // converts Expat-produced string in UTF-8 into wxString using the specified // conv or keep in UTF-8 if conv is NULL static wxString CharToString(wxMBConv *conv, - const char *s, size_t len = wxSTRING_MAXLEN) + const char *s, size_t len = wxString::npos) { #if wxUSE_UNICODE wxUnusedVar(conv); @@ -426,13 +426,13 @@ static wxString CharToString(wxMBConv *conv, // there can be no embedded NULs in this string so we don't need the // output length, it will be NUL-terminated const wxWCharBuffer wbuf( - wxConvUTF8.cMB2WC(s, len == wxSTRING_MAXLEN ? wxNO_LEN : len, NULL)); + wxConvUTF8.cMB2WC(s, len == wxString::npos ? wxNO_LEN : len, NULL)); return wxString(wbuf, *conv); } else // already in UTF-8, no conversion needed { - return wxString(s, len != wxSTRING_MAXLEN ? len : strlen(s)); + return wxString(s, len != wxString::npos ? len : strlen(s)); } #endif // wxUSE_UNICODE/!wxUSE_UNICODE } -- 2.45.2