diff --git a/src/osg/Shader.cpp b/src/osg/Shader.cpp index 794201f16..77e03e38c 100644 --- a/src/osg/Shader.cpp +++ b/src/osg/Shader.cpp @@ -33,8 +33,62 @@ #include #include -#include -#include +namespace osg +{ + +template +inline std::string::size_type find_first(const std::string& str, const M& match, std::string::size_type startpos, std::string::size_type endpos=std::string::npos) +{ + std::string::size_type endp = (endpos!=std::string::npos) ? endpos : str.size(); + + while(startpos