diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 15:13:57 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 18:39:25 +0100 |
commit | e08efe99cdb8d2159b2714d0f23e62678348eaed (patch) | |
tree | 518e9a047d0d45ccf5f3967871005151c818bf58 /sal/qa | |
parent | 4aa5e93a802af2228e4418aceec29d2aafa9b5de (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 7)
Change-Id: I2a72422a6c8185d17876daac41a86137048b034c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159627
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/osl/process/osl_process.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index e648d2467984..cab3bffd2d17 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -116,13 +116,11 @@ private: std::sort(env_container.begin(), env_container.end()); if (RUNNING_ON_VALGRIND) { - env_container.erase( - std::remove_if( - env_container.begin(), env_container.end(), + std::erase_if( + env_container, [](OString const & s) { return s.startsWith("LD_PRELOAD=") - || s.startsWith("VALGRIND_LIB="); }), - env_container.end()); + || s.startsWith("VALGRIND_LIB="); }); } } } @@ -245,9 +243,7 @@ public: //remove the environment variables that we have changed //in the child environment from the read parent environment - parent_env.erase( - std::remove_if(parent_env.begin(), parent_env.end(), exclude(different_env_vars)), - parent_env.end()); + std::erase_if(parent_env, exclude(different_env_vars)); for (auto& env : parent_env) std::cout << "stripped parent env: " << env << "\n"; |