Skip to content

Commit 57928f4

Browse files
authored
Use std::move in two more places (#275)
As suggested by Coverity Scan Signed-off-by: Sebastian Pipping <[email protected]>
1 parent dad575b commit 57928f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libfuzzer/libfuzzer_macro.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void RegisterPostProcessor(
235235
const protobuf::Descriptor* desc,
236236
std::function<void(protobuf::Message* message, unsigned int seed)>
237237
callback) {
238-
GetMutator()->RegisterPostProcessor(desc, callback);
238+
GetMutator()->RegisterPostProcessor(desc, std::move(callback));
239239
}
240240

241241
} // namespace libfuzzer

src/mutator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ class PostProcessing {
502502
Run(It->second.get(), max_depth);
503503
std::string value;
504504
It->second->SerializePartialToString(&value);
505-
*any->mutable_value() = value;
505+
*any->mutable_value() = std::move(value);
506506
}
507507
}
508508
}

0 commit comments

Comments
 (0)