]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/markupparser.cpp
Add a public wxModalDialogHook class for intercepting modal dialogs.
[wxWidgets.git] / src / common / markupparser.cpp
index d9dcf452c7e2f01f4f9153e6076bcd80e0b3b774..70b680bd7f9a2a6d9d688f50d91d81b6336aa558 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     Implementation of wxMarkupParser.
 // Author:      Vadim Zeitlin
 // Created:     2011-02-16
-// RCS-ID:      $Id$
+// RCS-ID:      $Id$
 // Copyright:   (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -172,7 +172,6 @@ wxMarkupParser::ParseAttrs(wxString attrs, TagAndAttrs& tagAndAttrs)
             else // Must be a CSS-like size specification
             {
                 int cssSize = 1;
-                wxString rest;
                 if ( value.StartsWith("xx-", &rest) )
                     cssSize = 3;
                 else if ( value.StartsWith("x-", &rest) )
@@ -280,10 +279,15 @@ bool wxMarkupParser::Parse(const wxString& text)
                         current.clear();
                     }
 
+                    // This variable is used only in the debugging messages
+                    // and doesn't need to be defined if they're not compiled
+                    // at all (it actually would result in unused variable
+                    // messages in this case).
+#if wxUSE_LOG_DEBUG || !defined(HAVE_VARIADIC_MACROS)
                     // Remember the tag starting position for the error
                     // messages.
                     const size_t pos = it - text.begin();
-
+#endif
                     bool start = true;
                     if ( ++it != end && *it == '/' )
                     {