]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/markupparser.cpp
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / src / common / markupparser.cpp
index cb87983b0e72f86b0d0f1bdfee96fc27da963b7b..5dbbf840cf1918d901d43b66671f659ec22fc4f6 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     Implementation of wxMarkupParser.
 // Author:      Vadim Zeitlin
 // Created:     2011-02-16
-// RCS-ID:      $Id$
 // Copyright:   (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -172,7 +171,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) )
@@ -279,7 +277,12 @@ bool wxMarkupParser::Parse(const wxString& text)
                         m_output.OnText(current);
                         current.clear();
                     }
-#if wxUSE_LOG_DEBUG
+
+                    // 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();