Commit b02623f9 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: remove substring operator() (issue #554)

- duplicate functionality to the substr() method and more difficult to
  notice when it is being used.
parent c903c397
......@@ -151,7 +151,7 @@ public:
inline string(const char c);
//- Construct from copies of a single character
inline string(const size_type, const char);
inline string(const size_type len, const char c);
//- Construct from Istream
string(Istream& is);
......@@ -267,19 +267,6 @@ public:
// \return True when strings match literally.
inline bool operator()(const std::string& text) const;
//- Return sub-string from the i-th character for \a n characters
inline string operator()
(
const size_type i,
const size_type n
) const;
//- Return sub-string from the first character for \a n characters
inline string operator()
(
const size_type n
) const;
// IOstream Operators
......
......@@ -243,22 +243,6 @@ inline bool Foam::string::operator()(const std::string& text) const
}
inline Foam::string Foam::string::operator()
(
const size_type i,
const size_type n
) const
{
return substr(i, n);
}
inline Foam::string Foam::string::operator()(const size_type n) const
{
return substr(0, n);
}
inline unsigned Foam::string::hash::operator()
(
const string& str,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment