From 71aaa56ae3b5a8d3c640822f5f066ba0c3a6cbe3 Mon Sep 17 00:00:00 2001 From: psi29a Date: Sun, 23 Apr 2023 19:46:29 +0000 Subject: [PATCH] replace boost where not needed --- apps/openmw_test_suite/nifosg/testnifloader.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/openmw_test_suite/nifosg/testnifloader.cpp b/apps/openmw_test_suite/nifosg/testnifloader.cpp index 3c13cb1f79..24b2de30ae 100644 --- a/apps/openmw_test_suite/nifosg/testnifloader.cpp +++ b/apps/openmw_test_suite/nifosg/testnifloader.cpp @@ -10,9 +10,6 @@ #include #include -#include -#include - #include #include @@ -55,7 +52,7 @@ namespace { if (line.starts_with('#')) continue; - boost::trim_right(line); + line.erase(line.find_last_not_of(" \t\n\r\f\v") + 1); result += line; result += '\n'; } @@ -113,7 +110,8 @@ osg::Group { std::string formatOsgNodeForShaderProperty(std::string_view shaderPrefix) { - static constexpr const char format[] = R"( + std::ostringstream oss; + oss << R"( osg::Group { UniqueID 1 DataVariance STATIC @@ -144,7 +142,8 @@ osg::Group { osg::StringValueObject { UniqueID 7 Name "shaderPrefix" - Value "%s" + Value ")" + << shaderPrefix << R"(" } osg::BoolValueObject { UniqueID 8 @@ -163,7 +162,7 @@ osg::Group { } } )"; - return (boost::format(format) % shaderPrefix).str(); + return oss.str(); } struct ShaderPrefixParams