mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
FunctionStringMap: improve code-reuse
The serialize() method now uses the serialize() function provided by revng/Support/YAMLTraits.h, so we don't have to explictly const_cast.
This commit is contained in:
@@ -119,8 +119,7 @@ struct CustomMappingTraits<std::map<MetaAddress, StringType>> {
|
||||
namespace revng::pipes {
|
||||
|
||||
llvm::Error FunctionStringMap::serialize(llvm::raw_ostream &OS) const {
|
||||
llvm::yaml::Output YAMLOutput(OS);
|
||||
YAMLOutput << const_cast<std::map<MetaAddress, String> &>(Map);
|
||||
::serialize(OS, Map);
|
||||
return llvm::Error::success();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user