tag/MixRamp: use std::string_view
This commit is contained in:
@@ -29,15 +29,15 @@ template<typename T>
|
|||||||
static bool
|
static bool
|
||||||
ParseMixRampTagTemplate(MixRampInfo &info, const T t) noexcept
|
ParseMixRampTagTemplate(MixRampInfo &info, const T t) noexcept
|
||||||
{
|
{
|
||||||
const auto start = t["mixramp_start"];
|
if (const std::string_view value = t["mixramp_start"];
|
||||||
if (!start.IsNull()) {
|
!value.empty()) {
|
||||||
info.SetStart(std::string(start.data, start.size));
|
info.SetStart(std::string{value});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto end = t["mixramp_end"];
|
if (const std::string_view value = t["mixramp_end"];
|
||||||
if (!end.IsNull()) {
|
!value.empty()) {
|
||||||
info.SetEnd(std::string(end.data, end.size));
|
info.SetEnd(std::string{value});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user