sal/osl/unx/backtraceapi.cxx | 8 +++++--- sal/qa/osl/process/osl_process.cxx | 10 ++++++---- 2 files changed, 11 insertions(+), 7 deletions(-)
New commits: commit 8546cdb2ad25b03ac152615357cab0006340d92f Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sat Oct 16 10:16:25 2021 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sat Oct 16 18:12:29 2021 +0200 Simplify vector initialization in sal Change-Id: Ia3e4dd8cad79b156d44eb03f1ae3d308204df2e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123691 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx index e98d8d663f39..b372a500f7f0 100644 --- a/sal/osl/unx/backtraceapi.cxx +++ b/sal/osl/unx/backtraceapi.cxx @@ -79,10 +79,12 @@ void process_file_addr2line( const char* file, std::vector<FrameData>& frameData OUString arg1("-Cfe"); OUString arg2 = OUString::fromUtf8(file); std::vector<OUString> addrs; - std::vector<rtl_uString*> args; + std::vector<rtl_uString*> args + { + arg1.pData, + arg2.pData + }; args.reserve(frameData.size() + 2); - args.push_back( arg1.pData ); - args.push_back( arg2.pData ); for( FrameData& frame : frameData ) { if( frame.file != nullptr && strcmp( file, frame.file ) == 0 ) diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 58510e3a1e08..c396a06b5782 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -382,10 +382,12 @@ public: osl_freeProcessHandle(process); - std::vector<OString> different_child_env_vars; - different_child_env_vars.push_back(ENV1); - different_child_env_vars.push_back(ENV2); - different_child_env_vars.push_back(ENV4); + std::vector<OString> different_child_env_vars + { + ENV1, + ENV2, + ENV4 + }; CPPUNIT_ASSERT_MESSAGE (