Skip to content

Commit 5e240cf

Browse files
committed
Use reference instead of copy in ASAN options constructor
1 parent 5f4c6eb commit 5e240cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/loader/layers/sanitizer/asan_options.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct AsanOptions {
9898

9999
auto KV = OptionsEnvMap->find("quarantine_size_mb");
100100
if (KV != OptionsEnvMap->end()) {
101-
auto Value = KV->second.front();
101+
const auto &Value = KV->second.front();
102102
try {
103103
auto temp_long = std::stoul(Value);
104104
if (temp_long > UINT32_MAX) {
@@ -129,7 +129,7 @@ struct AsanOptions {
129129

130130
KV = OptionsEnvMap->find("max_redzone");
131131
if (KV != OptionsEnvMap->end()) {
132-
auto Value = KV->second.front();
132+
const auto &Value = KV->second.front();
133133
try {
134134
MaxRZSize = std::stoul(Value);
135135
if (MaxRZSize > 2048) {

0 commit comments

Comments
 (0)