Revision 8278941d905e2ab914c1f56f1b7340661bb6ffa7 authored by Wenqing Wang on 16 July 2021, 12:57:50 UTC, committed by Dmitry Yu. Naumov on 29 July 2021, 10:18:53 UTC
1 parent 36c58ab
Utils.cpp
/**
* \file
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "Utils.h"
namespace ParameterLib
{
ParameterBase* findParameterByName(
std::string const& parameter_name,
std::vector<std::unique_ptr<ParameterBase>> const& parameters)
{
// Find corresponding parameter by name.
auto const it = std::find_if(
parameters.cbegin(), parameters.cend(),
[¶meter_name](std::unique_ptr<ParameterBase> const& p) {
return p->name == parameter_name;
});
if (it == parameters.end())
{
return nullptr;
}
DBUG("Found parameter `{:s}'.", (*it)->name);
return it->get();
}
} // namespace ParameterLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...