From 6f5fa6a02eb7502a15afab70c91451b8142e2ac3 Mon Sep 17 00:00:00 2001 From: Joanna Hulboj Date: Wed, 25 Sep 2019 08:54:06 +0100 Subject: Remove duplicated arguments Test-information: Unit tests pass on Windows 10 and Ubuntu 18.04.1 LTS. Change-Id: Icea837d91f28f47f7b0a90bc620b26c5567c8421 diff --git a/Swiften/Parser/ExpatParser.cpp b/Swiften/Parser/ExpatParser.cpp index 6c3845a..32d4f53 100644 --- a/Swiften/Parser/ExpatParser.cpp +++ b/Swiften/Parser/ExpatParser.cpp @@ -67,7 +67,7 @@ static void handleStartElement(void* parser, const XML_Char* name, const XML_Cha } auto* client = static_cast(parser)->getClient(); - client->handleStartElementPrefix(elemInfo.prefix, elemInfo.uri, elemInfo.name, elemInfo.name, elemInfo.uri, attributeValues); + client->handleStartElementPrefix(elemInfo.prefix, elemInfo.uri, elemInfo.name, attributeValues); client->handleStartElement(elemInfo.name, elemInfo.uri, attributeValues); } diff --git a/Swiften/Parser/LibXMLParser.cpp b/Swiften/Parser/LibXMLParser.cpp index 71515a7..b8d941c 100644 --- a/Swiften/Parser/LibXMLParser.cpp +++ b/Swiften/Parser/LibXMLParser.cpp @@ -57,7 +57,7 @@ static void handleStartElement(void* parser, const xmlChar* name, const xmlChar* auto nameStr = asString(name); auto xmlsnsStr = asString(xmlns); auto prefixStr = asString(prefix); - client->handleStartElementPrefix(prefixStr, xmlsnsStr, nameStr, nameStr, xmlsnsStr, attributeValues); + client->handleStartElementPrefix(prefixStr, xmlsnsStr, nameStr, attributeValues); client->handleStartElement(nameStr, xmlsnsStr, attributeValues); } diff --git a/Swiften/Parser/UnitTest/XMLParserTest.cpp b/Swiften/Parser/UnitTest/XMLParserTest.cpp index 4db694e..d38c1cc 100644 --- a/Swiften/Parser/UnitTest/XMLParserTest.cpp +++ b/Swiften/Parser/UnitTest/XMLParserTest.cpp @@ -449,7 +449,7 @@ class XMLParserTest : public CppUnit::TestFixture { events.push_back(Event(StartElement, element, ns, attributes, std::move(namespaces_))); } - void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& name, const std::string&, const std::string&, const AttributeMap&) override { + void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& name, const AttributeMap&) override { if (!testingStartElementPrefix) return; events.push_back(Event(StartElementPrefix, name, uri, prefix, AttributeMap(), NamespaceMap())); } diff --git a/Swiften/Parser/XMLParserClient.cpp b/Swiften/Parser/XMLParserClient.cpp index 847e1f3..6698900 100644 --- a/Swiften/Parser/XMLParserClient.cpp +++ b/Swiften/Parser/XMLParserClient.cpp @@ -14,7 +14,7 @@ XMLParserClient::~XMLParserClient() { void XMLParserClient::handleStartElement(const std::string&, const std::string&, const AttributeMap&) { } -void XMLParserClient::handleStartElementPrefix(const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const AttributeMap&) { +void XMLParserClient::handleStartElementPrefix(const std::string&, const std::string&, const std::string&, const AttributeMap&) { } void XMLParserClient::handleNamespaceDeclaration(const std::string&, const std::string&) { diff --git a/Swiften/Parser/XMLParserClient.h b/Swiften/Parser/XMLParserClient.h index f519646..2f0bc9e 100644 --- a/Swiften/Parser/XMLParserClient.h +++ b/Swiften/Parser/XMLParserClient.h @@ -19,7 +19,7 @@ namespace Swift { * he is interested in processing the element prefix or not. */ virtual void handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes); - virtual void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& name, const std::string& element, const std::string& ns, const AttributeMap& attributes); + virtual void handleStartElementPrefix(const std::string& prefix, const std::string& uri, const std::string& element, const AttributeMap& attributes); virtual void handleEndElement(const std::string& element, const std::string& ns) = 0; virtual void handleCharacterData(const std::string& data) = 0; -- cgit v0.10.2-6-g49f6