From a2b6395853decc6f6b7445acc7104f0edf782ba0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr>
Date: Tue, 7 May 2019 17:19:26 +0200
Subject: [PATCH] PERF: use std find instead of loop

---
 .../ApplicationEngine/src/otbWrapperApplication.cxx        | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx
index 1d64c7614e..7213308d8d 100644
--- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx
+++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx
@@ -269,12 +269,7 @@ void Application::AddDocTag(const std::string & tag)
 
 bool Application::IsDeprecated()
 {
-  for (auto tag:m_DocTags)
-  {
-    if (tag==Tags::Deprecated)
-      return true;
-  }
-  return false;
+  return std::find(m_DocTags.begin(), m_DocTags.end(), Tags::Deprecated) != m_DocTags.end();
 }
 
 DocExampleStructure::Pointer Application::GetDocExample()
-- 
GitLab