Commit d2e711c5 authored by Victor Poughon's avatar Victor Poughon

ENH: better for loop (!150 code review)

parent 066f0346
......@@ -181,12 +181,12 @@ std::vector<std::string> Application::GetDocTags() const
void Application::AddDocTag(const std::string & tag)
{
for (unsigned int i=0; i<m_DocTags.size(); i++)
{
if (m_DocTags[i].compare(tag) == 0) return;
}
m_DocTags.push_back( tag );
this->Modified();
const auto wh = std::find(begin(m_DocTags), end(m_DocTags), tag);
if (wh == end(m_DocTags))
{
m_DocTags.push_back(tag);
this->Modified();
}
}
DocExampleStructure::Pointer Application::GetDocExample()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment