diff --git a/simgear/misc/CSSBorder.cxx b/simgear/misc/CSSBorder.cxx index e15828d6..c33ce4b1 100644 --- a/simgear/misc/CSSBorder.cxx +++ b/simgear/misc/CSSBorder.cxx @@ -18,7 +18,6 @@ #include "CSSBorder.hxx" -#include #include #include @@ -114,9 +113,9 @@ namespace simgear std::max ( 0.f, - boost::lexical_cast + std::stof ( - rel ? boost::make_iterator_range(tok->begin(), tok->end() - 1) + rel ? std::string(tok->begin(), tok->end() - 1) : *tok ) / diff --git a/simgear/scene/material/TextureBuilder.cxx b/simgear/scene/material/TextureBuilder.cxx index dd228fd4..0de2882c 100644 --- a/simgear/scene/material/TextureBuilder.cxx +++ b/simgear/scene/material/TextureBuilder.cxx @@ -39,7 +39,6 @@ #include #include -#include #include #include @@ -124,10 +123,11 @@ void TextureUnitBuilder::buildAttribute(Effect* effect, Pass* pass, const SGPropertyNode* pName = prop->getChild("name"); if (pName) try { - unit = boost::lexical_cast(pName->getStringValue()); - } catch (boost::bad_lexical_cast& lex) { + unit = std::stoi(pName->getStringValue()); + } + catch (const std::invalid_argument& ia) { SG_LOG(SG_INPUT, SG_ALERT, "can't decode name as texture unit " - << lex.what()); + << ia.what()); } } const SGPropertyNode* pType = getEffectPropertyChild(effect, prop, "type"); diff --git a/simgear/scene/material/makeEffect.cxx b/simgear/scene/material/makeEffect.cxx index cfbb87af..40926dce 100644 --- a/simgear/scene/material/makeEffect.cxx +++ b/simgear/scene/material/makeEffect.cxx @@ -11,9 +11,7 @@ #include #include #include -#include -#include #include #include @@ -167,22 +165,25 @@ Effect* makeEffect(SGPropertyNode* prop, vector techniques = prop->getChildren("technique"); for (int i = 0; i < (int)techniques.size(); ++i) { SGPropertyNode* tniqProp = techniques[i].ptr(); - if (!tniqProp->hasChild("name")) + if (!tniqProp->hasChild("name")) { setValue(tniqProp->getChild("name", 0, true), - boost::lexical_cast(i)); + std::to_string(i)); + } vector passes = tniqProp->getChildren("pass"); for (int j = 0; j < (int)passes.size(); ++j) { SGPropertyNode* passProp = passes[j].ptr(); - if (!passProp->hasChild("name")) + if (!passProp->hasChild("name")) { setValue(passProp->getChild("name", 0, true), - boost::lexical_cast(j)); + std::to_string(j)); + } vector texUnits = passProp->getChildren("texture-unit"); for (int k = 0; k < (int)texUnits.size(); ++k) { SGPropertyNode* texUnitProp = texUnits[k].ptr(); - if (!texUnitProp->hasChild("name")) + if (!texUnitProp->hasChild("name")) { setValue(texUnitProp->getChild("name", 0, true), - boost::lexical_cast(k)); + std::to_string(k)); + } } } } diff --git a/simgear/scene/material/mipmap.cxx b/simgear/scene/material/mipmap.cxx index f2487ef0..0fcf6752 100644 --- a/simgear/scene/material/mipmap.cxx +++ b/simgear/scene/material/mipmap.cxx @@ -27,7 +27,6 @@ #include #include -#include #include namespace simgear { namespace effect { diff --git a/simgear/scene/model/ModelRegistry.cxx b/simgear/scene/model/ModelRegistry.cxx index 5e2bcdf4..73e5a353 100644 --- a/simgear/scene/model/ModelRegistry.cxx +++ b/simgear/scene/model/ModelRegistry.cxx @@ -66,7 +66,6 @@ #include "BoundingVolumeBuildVisitor.hxx" #include "model.hxx" -#include #include #include diff --git a/simgear/scene/model/SGLightAnimation.cxx b/simgear/scene/model/SGLightAnimation.cxx index 76976067..52945469 100644 --- a/simgear/scene/model/SGLightAnimation.cxx +++ b/simgear/scene/model/SGLightAnimation.cxx @@ -19,8 +19,6 @@ # include #endif -#include - #include "animation.hxx" #include "ConditionNode.hxx" @@ -109,7 +107,7 @@ SGLightAnimation::SGLightAnimation(simgear::SGTransientModelData &modelData) : _cutoff = getConfig()->getDoubleValue("cutoff"); _near = getConfig()->getDoubleValue("near-m"); _far = getConfig()->getDoubleValue("far-m"); - _key = modelData.getPath() + ";" + boost::lexical_cast(modelData.getIndex() ); + _key = modelData.getPath() + ";" + std::to_string(modelData.getIndex()); SGConstPropertyNode_ptr dim_factor = modelData.getConfigNode()->getChild("dim-factor"); if (dim_factor.valid()) { diff --git a/simgear/scene/util/parse_color.cxx b/simgear/scene/util/parse_color.cxx index cb095c3c..c649a11f 100644 --- a/simgear/scene/util/parse_color.cxx +++ b/simgear/scene/util/parse_color.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -77,7 +76,7 @@ namespace simgear tok != tokens.end() && comp < 4; ++tok, ++comp ) { - color[comp] = boost::lexical_cast(*tok) + color[comp] = std::stof(*tok) // rgb = [0,255], a = [0,1] / (comp < 3 ? 255 : 1); }