From 16002e281df56503a9233bc0864808b12012cdf5 Mon Sep 17 00:00:00 2001 From: Alexey Antipovsky Date: Mon, 5 Apr 2021 13:20:32 +0300 Subject: [PATCH] [MCOL-4573] resize cpimport.bin arg vector as needed --- writeengine/splitter/we_splitterapp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/writeengine/splitter/we_splitterapp.cpp b/writeengine/splitter/we_splitterapp.cpp index dd3ed2288..57cfb9e15 100644 --- a/writeengine/splitter/we_splitterapp.cpp +++ b/writeengine/splitter/we_splitterapp.cpp @@ -479,16 +479,16 @@ void WESplitterApp::invokeCpimport() std::istringstream ss(aCmdLineStr); std::string arg; - std::vector v2(50, ""); - unsigned int i = 0; + std::vector v2; + v2.reserve(50); while (ss >> arg) { //we need something that works on Windows as well as linux - v2[i++] = arg; + v2.push_back(arg); } - for (unsigned int j = 0; j < i; ++j) + for (unsigned int j = 0; j < v2.size(); ++j) { Cmds.push_back(const_cast(v2[j].c_str())); }