diff --git a/src/osg/Shader.cpp b/src/osg/Shader.cpp index f77249487..270d17835 100644 --- a/src/osg/Shader.cpp +++ b/src/osg/Shader.cpp @@ -34,6 +34,63 @@ #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