DNAYaml: Use std::string_view instead of std::string for base64 characters

Eliminates a runtime static constructor that needs to execute. Also gets
rid of a heap allocation.
This commit is contained in:
Lioncash 2019-08-15 08:09:38 -04:00
parent ee5b894537
commit 9fc76a7dea
1 changed files with 1 additions and 1 deletions

View File

@ -1003,7 +1003,7 @@ bool YAMLDocWriter::RecursiveFinish(yaml_emitter_t* doc, const YAMLNode& node) {
return true;
}
static const std::string base64_chars =
constexpr std::string_view base64_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";