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

View File

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