From 79808683476f5b53745b001f0d4b96db6256618a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 31 Aug 2013 17:41:13 +0000 Subject: [PATCH] Removed a method using wxColour from non-GUI benchmark code. No idea how could this work before but the presence of this code in the non-GUI benchmark project prevented it from building. As it's not used anyhow, just remove it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/benchmarks/htmlparser/htmltag.cpp | 45 ------------------------- tests/benchmarks/htmlparser/htmltag.h | 3 -- 2 files changed, 48 deletions(-) diff --git a/tests/benchmarks/htmlparser/htmltag.cpp b/tests/benchmarks/htmlparser/htmltag.cpp index d8a8f14d8b..926db2d2a7 100644 --- a/tests/benchmarks/htmlparser/htmltag.cpp +++ b/tests/benchmarks/htmlparser/htmltag.cpp @@ -14,10 +14,6 @@ #include "htmltag.h" -#ifndef WXPRECOMP - #include "wx/colour.h" -#endif - #include "htmlpars.h" #include // for vsscanf #include @@ -406,47 +402,6 @@ int wx28HtmlTag::ScanParam(const wxString& par, return wxSscanf(parval, format, param); } -bool wx28HtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const -{ - wxCHECK_MSG( clr, false, wxT("invalid colour argument") ); - - wxString str = GetParam(par); - - // handle colours defined in HTML 4.0 first: - if (str.length() > 1 && str[0] != wxT('#')) - { - #define HTML_COLOUR(name, r, g, b) \ - if (str.IsSameAs(wxT(name), false)) \ - { clr->Set(r, g, b); return true; } - HTML_COLOUR("black", 0x00,0x00,0x00) - HTML_COLOUR("silver", 0xC0,0xC0,0xC0) - HTML_COLOUR("gray", 0x80,0x80,0x80) - HTML_COLOUR("white", 0xFF,0xFF,0xFF) - HTML_COLOUR("maroon", 0x80,0x00,0x00) - HTML_COLOUR("red", 0xFF,0x00,0x00) - HTML_COLOUR("purple", 0x80,0x00,0x80) - HTML_COLOUR("fuchsia", 0xFF,0x00,0xFF) - HTML_COLOUR("green", 0x00,0x80,0x00) - HTML_COLOUR("lime", 0x00,0xFF,0x00) - HTML_COLOUR("olive", 0x80,0x80,0x00) - HTML_COLOUR("yellow", 0xFF,0xFF,0x00) - HTML_COLOUR("navy", 0x00,0x00,0x80) - HTML_COLOUR("blue", 0x00,0x00,0xFF) - HTML_COLOUR("teal", 0x00,0x80,0x80) - HTML_COLOUR("aqua", 0x00,0xFF,0xFF) - #undef HTML_COLOUR - } - - // then try to parse #rrggbb representations or set from other well - // known names (note that this doesn't strictly conform to HTML spec, - // but it doesn't do real harm -- but it *must* be done after the standard - // colors are handled above): - if (clr->Set(str)) - return true; - - return false; -} - bool wx28HtmlTag::GetParamAsInt(const wxString& par, int *clr) const { if ( !HasParam(par) ) diff --git a/tests/benchmarks/htmlparser/htmltag.h b/tests/benchmarks/htmlparser/htmltag.h index ec21633624..a371f3cd1d 100644 --- a/tests/benchmarks/htmlparser/htmltag.h +++ b/tests/benchmarks/htmlparser/htmltag.h @@ -14,7 +14,6 @@ #include "wx/object.h" #include "wx/arrstr.h" -class wxColour; class wx28HtmlEntitiesParser; //----------------------------------------------------------------------------- @@ -91,8 +90,6 @@ public: // (or ("WhaT.jpg") if with_commas == true) wxString GetParam(const wxString& par, bool with_commas = false) const; - // Convenience functions: - bool GetParamAsColour(const wxString& par, wxColour *clr) const; bool GetParamAsInt(const wxString& par, int *clr) const; // Scans param like scanf() functions family does. -- 2.45.2