Revert "Prevent env knob strings from being copied at each iteration"

This reverts commit 3d70d3b47e.
This commit is contained in:
Junhyun Shim 2022-08-26 10:53:32 +02:00
parent 3d70d3b47e
commit 19d551d682
1 changed files with 2 additions and 2 deletions

View File

@ -1115,7 +1115,7 @@ private:
CLIOptions() = default;
void parseEnvInternal() {
for (const std::string& knob : getEnvironmentKnobOptions()) {
for (std::string knob : getEnvironmentKnobOptions()) {
auto pos = knob.find_first_of("=");
if (pos == std::string::npos) {
fprintf(stderr,
@ -2065,7 +2065,7 @@ int main(int argc, char* argv[]) {
}
std::string environmentKnobOptions;
for (const std::string& knobOption : getEnvironmentKnobOptions()) {
for (std::string knobOption : getEnvironmentKnobOptions()) {
environmentKnobOptions += knobOption + " ";
}
if (environmentKnobOptions.length()) {