diff --git a/components/resource/keyframemanager.cpp b/components/resource/keyframemanager.cpp index beef689e85..88b37be0fc 100644 --- a/components/resource/keyframemanager.cpp +++ b/components/resource/keyframemanager.cpp @@ -23,6 +23,25 @@ namespace Resource { + namespace + { + std::string parseTextKey(const std::string& line) + { + const std::size_t spacePos = line.find_last_of(' '); + if (spacePos != std::string::npos) + return line.substr(0, spacePos); + return {}; + } + + double parseTimeSignature(std::string_view line) + { + size_t spacePos = line.find_last_of(' '); + double time = 0.0; + if (spacePos != std::string::npos && spacePos + 1 < line.size()) + time = Misc::StringUtils::toNumeric(line.substr(spacePos + 1), time); + return time; + } + } RetrieveAnimationsVisitor::RetrieveAnimationsVisitor(SceneUtil::KeyframeHolder& target, osg::ref_ptr animationManager, const std::string& normalized, @@ -179,23 +198,6 @@ namespace Resource traverse(node); } - std::string RetrieveAnimationsVisitor::parseTextKey(const std::string& line) - { - size_t spacePos = line.find_last_of(' '); - if (spacePos != std::string::npos) - return line.substr(0, spacePos); - return ""; - } - - double RetrieveAnimationsVisitor::parseTimeSignature(const std::string& line) - { - size_t spacePos = line.find_last_of(' '); - double time = 0.0; - if (spacePos != std::string::npos && spacePos + 1 < line.size()) - time = Misc::StringUtils::toNumeric(line.substr(spacePos + 1), time); - return time; - } - KeyframeManager::KeyframeManager(const VFS::Manager* vfs, SceneManager* sceneManager, double expiryDelay, const ToUTF8::StatelessUtf8Encoder* encoder) : ResourceManager(vfs, expiryDelay) diff --git a/components/resource/keyframemanager.hpp b/components/resource/keyframemanager.hpp index e5dc1af1cc..9dac730042 100644 --- a/components/resource/keyframemanager.hpp +++ b/components/resource/keyframemanager.hpp @@ -33,9 +33,6 @@ namespace Resource virtual void apply(osg::Node& node) override; private: - std::string parseTextKey(const std::string& line); - double parseTimeSignature(const std::string& line); - SceneUtil::KeyframeHolder& mTarget; osg::ref_ptr mAnimationManager; VFS::Path::Normalized mPath;