[Libreoffice-commits] .: autodoc/inc autodoc/source
Kevin Hunter
hunteke at kemper.freedesktop.org
Mon Oct 10 11:50:18 PDT 2011
autodoc/inc/ary_i/ci_text2.hxx | 2 +-
autodoc/source/ary_i/kernel/ci_text2.cxx | 12 ------------
2 files changed, 1 insertion(+), 13 deletions(-)
New commits:
commit 60f108553552eba8441589c47294f252e4ace1e5
Author: Kevin Hunter <hunteke at earlham.edu>
Date: Mon Oct 10 13:58:25 2011 -0400
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.
diff --git a/autodoc/inc/ary_i/ci_text2.hxx b/autodoc/inc/ary_i/ci_text2.hxx
index 8e1c202..eef1d63 100644
--- a/autodoc/inc/ary_i/ci_text2.hxx
+++ b/autodoc/inc/ary_i/ci_text2.hxx
@@ -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();
diff --git a/autodoc/source/ary_i/kernel/ci_text2.cxx b/autodoc/source/ary_i/kernel/ci_text2.cxx
index 00a5a7e..dea062f 100644
--- a/autodoc/source/ary_i/kernel/ci_text2.cxx
+++ b/autodoc/source/ary_i/kernel/ci_text2.cxx
@@ -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;
More information about the Libreoffice-commits
mailing list