Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
Merge pull request #86 from dawagner/dead-code-removal
Browse files Browse the repository at this point in the history
Dead code removal

These methods weren't used by anyone. This PR helps closing the coverage gap for #85.
  • Loading branch information
dawagner committed Apr 13, 2015
2 parents c918493 + 8b18043 commit 6d605e3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 31 deletions.
23 changes: 0 additions & 23 deletions parameter/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,6 @@ const CElement* CElement::getChild(size_t uiIndex) const
return _childArray[uiIndex];
}

CElement* CElement::getLastChild()
{
size_t uiNbChildren = getNbChildren();

assert(uiNbChildren);

return _childArray[uiNbChildren - 1];
}

CElement* CElement::createChild(const CXmlElement& childElement,
CXmlSerializingContext& serializingContext)
{
Expand Down Expand Up @@ -600,20 +591,6 @@ bool CElement::isDescendantOf(const CElement* pCandidateAscendant) const
return _pParent->isDescendantOf(pCandidateAscendant);
}

CElement* CElement::findAscendantOfKind(const string& strKind)
{
if (!_pParent) {

return NULL;
}

if (_pParent->getKind() == strKind) {

return _pParent;
}
return _pParent->findAscendantOfKind(strKind);
}

CElement* CElement::findChild(const string& strName)
{
uint32_t uiIndex;
Expand Down
2 changes: 0 additions & 2 deletions parameter/Element.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ class CElement : public IXmlSink, public IXmlSource
static void appendTitle(std::string& strTo, const std::string& strTitle);

// Hierarchy
CElement* getLastChild();
CElement* getParent();
CElement* findAscendantOfKind(const std::string& strKind);

/**
* Creates a child CElement from a child XML Element
Expand Down
5 changes: 0 additions & 5 deletions xmlserializer/XmlElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,6 @@ void CXmlElement::setTextContent(const string& strContent)
xmlAddChild(_pXmlElement, xmlNewText(BAD_CAST strContent.c_str()));
}

void CXmlElement::setComment(const string& strComment)
{
xmlAddChild(_pXmlElement, xmlNewComment(BAD_CAST strComment.c_str()));
}

// Child creation
void CXmlElement::createChild(CXmlElement& childElement, const string& strType)
{
Expand Down
1 change: 0 additions & 1 deletion xmlserializer/XmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class CXmlElement
void setAttributeString(const std::string& strAttributeName, const std::string& strValue);
void setNameAttribute(const std::string& strValue);
void setTextContent(const std::string& strContent);
void setComment(const std::string& strComment);
void setAttributeInteger(const std::string& strAttributeName, uint32_t uiValue);
/**
* Set attribute with signed integer
Expand Down

0 comments on commit 6d605e3

Please sign in to comment.