Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
This commit is contained in:
@@ -430,7 +430,7 @@ void ViewProviderFemPostObject::updateProperties()
|
||||
m_coloringEnum.setEnums(colorArrays);
|
||||
Field.setValue(m_coloringEnum);
|
||||
|
||||
std::vector<std::string>::iterator it = std::find(colorArrays.begin(), colorArrays.end(), val);
|
||||
auto it = std::ranges::find(colorArrays, val);
|
||||
if (!val.empty() && it != colorArrays.end()) {
|
||||
Field.setValue(val.c_str());
|
||||
}
|
||||
@@ -472,7 +472,7 @@ void ViewProviderFemPostObject::updateProperties()
|
||||
m_vectorEnum.setEnums(colorArrays);
|
||||
VectorMode.setValue(m_vectorEnum);
|
||||
|
||||
it = std::find(colorArrays.begin(), colorArrays.end(), val);
|
||||
it = std::ranges::find(colorArrays, val);
|
||||
if (!val.empty() && it != colorArrays.end()) {
|
||||
VectorMode.setValue(val.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user