Changed string literal to string_view

This commit is contained in:
Xiao Qi 2023-02-27 03:44:12 +08:00
parent 69d3cc7619
commit 73a7cbcda0
2 changed files with 7 additions and 3 deletions

View File

@ -100,6 +100,10 @@ constexpr std::string_view SCALE_PATH{ "scale" };
constexpr std::string_view ROTATION_PATH{ "rotation" };
constexpr std::string_view WEIGHTS_PATH{ "weights" };
constexpr std::string_view LINEAR_INTERPOLATION{ "LINEAR" };
constexpr std::string_view STEP_INTERPOLATION{ "STEP" };
constexpr std::string_view CUBICSPLINE_INTERPOLATION{ "CUBICSPLINE" };
//Directory
#ifdef _PUBLISH
constexpr std::string_view ASSET_ROOT{ "Assets" };

View File

@ -240,9 +240,9 @@ namespace SH_COMP
FetchChannelKeyFrame(channel.target_node, sampler.input, sampler.output, channel.target_node, anim.nodes[channel.target_node].rotationKeys);
anim.nodes[channel.target_node].interpolation =
sampler.interpolation == "LINEAR" ? AnimationInterpolation::LINEAR :
sampler.interpolation == "STEP" ? AnimationInterpolation::STEP :
sampler.interpolation == "CUBICSPLINE" ? AnimationInterpolation::CUBICSPLINE :
sampler.interpolation == LINEAR_INTERPOLATION.data() ? AnimationInterpolation::LINEAR :
sampler.interpolation == STEP_INTERPOLATION.data() ? AnimationInterpolation::STEP :
sampler.interpolation == CUBICSPLINE_INTERPOLATION.data() ? AnimationInterpolation::CUBICSPLINE :
AnimationInterpolation::DEFAULT;
}