diff --git a/src/opm/parser/eclipse/Deck/DeckItem.cpp b/src/opm/parser/eclipse/Deck/DeckItem.cpp index d34953b25..e9b74b443 100644 --- a/src/opm/parser/eclipse/Deck/DeckItem.cpp +++ b/src/opm/parser/eclipse/Deck/DeckItem.cpp @@ -20,8 +20,7 @@ #include #include #include - -#include +#include #include #include @@ -261,9 +260,7 @@ void DeckItem::push_backDummyDefault() { } std::string DeckItem::getTrimmedString( size_t index ) const { - return boost::algorithm::trim_copy( - this->value_ref< std::string >().at( index ) - ); + return trim_copy(this->value_ref< std::string >().at(index)); } double DeckItem::getSIDouble( size_t index ) const { diff --git a/src/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp b/src/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp index f79712ca5..3bd4c14f7 100644 --- a/src/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp +++ b/src/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp @@ -17,8 +17,10 @@ along with OPM. If not, see . */ -#include #include +#include + +#include namespace Opm { @@ -44,8 +46,7 @@ namespace Opm { } ModeEnum PinchModeFromString(const std::string& stringValue) { - std::string s(stringValue); - boost::algorithm::trim(s); + std::string s = trim_copy(stringValue); ModeEnum mode; if (s == "ALL") { mode = ModeEnum::ALL; } diff --git a/src/opm/parser/eclipse/Parser/raw/RawKeyword.cpp b/src/opm/parser/eclipse/Parser/raw/RawKeyword.cpp index 405e0da0e..7bc4e86b5 100644 --- a/src/opm/parser/eclipse/Parser/raw/RawKeyword.cpp +++ b/src/opm/parser/eclipse/Parser/raw/RawKeyword.cpp @@ -17,7 +17,6 @@ along with OPM. If not, see . */ #include -#include #include #include @@ -31,7 +30,7 @@ namespace Opm { namespace { std::string keyword_name(const std::string& input_name) { - std::string name = boost::algorithm::trim_right_copy(input_name); + std::string name = rtrim_copy(input_name); if (!ParserKeyword::validDeckName(name)) throw std::invalid_argument("Not a valid keyword:" + name); diff --git a/src/opm/parser/eclipse/RawDeck/RawKeyword.cpp b/src/opm/parser/eclipse/RawDeck/RawKeyword.cpp index 5bc1824e9..1e660cbed 100644 --- a/src/opm/parser/eclipse/RawDeck/RawKeyword.cpp +++ b/src/opm/parser/eclipse/RawDeck/RawKeyword.cpp @@ -17,7 +17,6 @@ along with OPM. If not, see . */ #include -#include #include #include @@ -153,12 +152,12 @@ namespace Opm { } void RawKeyword::setKeywordName(const std::string& name) { - m_name = boost::algorithm::trim_right_copy(name); + m_name = rtrim_copy(name); if (!isValidKeyword(m_name)) { throw std::invalid_argument("Not a valid keyword:" + name); } else if (m_name.size() > Opm::RawConsts::maxKeywordLength) { throw std::invalid_argument("Too long keyword:" + name); - } else if (boost::algorithm::trim_left_copy(m_name) != m_name) { + } else if (ltrim_copy(m_name) != m_name) { throw std::invalid_argument("Illegal whitespace start of keyword:" + name); } }