mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 16:36:41 +00:00
replace boost where not needed
This commit is contained in:
parent
ebf6f50523
commit
71aaa56ae3
1 changed files with 6 additions and 7 deletions
|
@ -10,9 +10,6 @@
|
||||||
#include <gmock/gmock.h>
|
#include <gmock/gmock.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
|
||||||
#include <boost/format.hpp>
|
|
||||||
|
|
||||||
#include <osgDB/Registry>
|
#include <osgDB/Registry>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
@ -55,7 +52,7 @@ namespace
|
||||||
{
|
{
|
||||||
if (line.starts_with('#'))
|
if (line.starts_with('#'))
|
||||||
continue;
|
continue;
|
||||||
boost::trim_right(line);
|
line.erase(line.find_last_not_of(" \t\n\r\f\v") + 1);
|
||||||
result += line;
|
result += line;
|
||||||
result += '\n';
|
result += '\n';
|
||||||
}
|
}
|
||||||
|
@ -113,7 +110,8 @@ osg::Group {
|
||||||
|
|
||||||
std::string formatOsgNodeForShaderProperty(std::string_view shaderPrefix)
|
std::string formatOsgNodeForShaderProperty(std::string_view shaderPrefix)
|
||||||
{
|
{
|
||||||
static constexpr const char format[] = R"(
|
std::ostringstream oss;
|
||||||
|
oss << R"(
|
||||||
osg::Group {
|
osg::Group {
|
||||||
UniqueID 1
|
UniqueID 1
|
||||||
DataVariance STATIC
|
DataVariance STATIC
|
||||||
|
@ -144,7 +142,8 @@ osg::Group {
|
||||||
osg::StringValueObject {
|
osg::StringValueObject {
|
||||||
UniqueID 7
|
UniqueID 7
|
||||||
Name "shaderPrefix"
|
Name "shaderPrefix"
|
||||||
Value "%s"
|
Value ")"
|
||||||
|
<< shaderPrefix << R"("
|
||||||
}
|
}
|
||||||
osg::BoolValueObject {
|
osg::BoolValueObject {
|
||||||
UniqueID 8
|
UniqueID 8
|
||||||
|
@ -163,7 +162,7 @@ osg::Group {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
return (boost::format(format) % shaderPrefix).str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ShaderPrefixParams
|
struct ShaderPrefixParams
|
||||||
|
|
Loading…
Reference in a new issue