Kaydet (Commit) 60f10855 authored tarafından Kevin Hunter's avatar Kevin Hunter

Simplify logic to use std::vector's .empty()

No need to muck about with iterators, adding a loop, and 2 function
calls to test for empty: it's a std::vector under the hood, so use
.empty(), and inline it.
üst 76a0e6ee
......@@ -72,7 +72,7 @@ class DocuTex2
DYN DocuToken & let_drToken );
const TokenList & Tokens() const { return aTokens; }
bool IsEmpty() const;
bool IsEmpty() const { return aTokens.empty(); }
const String & TextOfFirstToken() const;
String & Access_TextOfFirstToken();
......
......@@ -77,18 +77,6 @@ DocuTex2::AddToken( DYN DocuToken & let_drToken )
aTokens.push_back(&let_drToken);
}
bool
DocuTex2::IsEmpty() const
{
for ( ary::inf::DocuTex2::TokenList::const_iterator
iter = aTokens.begin();
iter != aTokens.end();
)
{
return false;
}
return true;
}
using csi::dsapi::DT_TextToken;
......
Markdown is supported
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