[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - autodoc/source stlport/systemstl
Herbert Dürr
hdu at apache.org
Fri Jul 26 07:08:05 PDT 2013
autodoc/source/inc/estack.hxx | 1 -
autodoc/source/parser/cpp/sownstck.hxx | 28 ++++++++++++++--------------
stlport/systemstl/slist | 3 +++
3 files changed, 17 insertions(+), 15 deletions(-)
New commits:
commit 35b5e2906b1966a43604f1addeaea56d785861a6
Author: Herbert Dürr <hdu at apache.org>
Date: Fri Jul 26 13:26:18 2013 +0000
#i122853# prevent use of slist::size() for all platforms
even for the once that emulate slist using std::list
diff --git a/stlport/systemstl/slist b/stlport/systemstl/slist
index 260983d..295651f 100644
--- a/stlport/systemstl/slist
+++ b/stlport/systemstl/slist
@@ -64,6 +64,9 @@ public:
typedef typename _super::const_iterator slist_cit;
#ifndef STLP4_SLIST_WITH_LIST
slist_mit insert( slist_cit aI, const T& rT) { return _super::insert_after( aI, rT); }
+#else
+private:
+ size_t size() const; // prevent use of slist::size() as forward_list doesn't have a size() method
#endif
};
commit fd014c0ea04602f43d5f59d16112c3c351871b8b
Author: Herbert Dürr <hdu at apache.org>
Date: Fri Jul 26 13:04:33 2013 +0000
#i122853# replace use of size() method for single linked lists
diff --git a/autodoc/source/inc/estack.hxx b/autodoc/source/inc/estack.hxx
index 29ec063..351560e 100644
--- a/autodoc/source/inc/estack.hxx
+++ b/autodoc/source/inc/estack.hxx
@@ -74,7 +74,6 @@ class EStack : private std::slist<ELEM>
// INQUIRY
const value_type & top() const { return base::front(); }
- size_type size() const { return base::size(); }
bool empty() const { return base::empty(); }
// ACCESS
diff --git a/autodoc/source/parser/cpp/sownstck.hxx b/autodoc/source/parser/cpp/sownstck.hxx
index a3ec524..ca3a1fa 100644
--- a/autodoc/source/parser/cpp/sownstck.hxx
+++ b/autodoc/source/parser/cpp/sownstck.hxx
@@ -121,7 +121,7 @@ inline ary::cpp::Class *
ContextForAry::
S_OwnerStack::CurClass() const
{
- return aStack_Classes.size() > 0
+ return !aStack_Classes.empty()
? aStack_Classes.top().first
: (ary::cpp::Class *) 0;
}
@@ -130,7 +130,7 @@ inline void
ContextForAry::
S_OwnerStack::SetOwner_2CurNamespace()
{
- csv_assert( aStack_Namespaces.size() > 0 );
+ csv_assert( !aStack_Namespaces.empty() );
pOwner_Cur = pOwner_Namespace.MutablePtr();
pOwner_Namespace->SetAnotherNamespace( CurNamespace() );
}
@@ -139,7 +139,7 @@ inline void
ContextForAry::
S_OwnerStack::SetOwner_2CurClass()
{
- csv_assert( aStack_Classes.size() > 0 );
+ csv_assert( !aStack_Classes.empty() );
pOwner_Cur = pOwner_Class.MutablePtr();
pOwner_Class->SetAnotherClass( *CurClass() );
}
@@ -173,7 +173,7 @@ inline void
ContextForAry::
S_OwnerStack::SetGlobalNamespace( ary::cpp::Namespace & io_rGlobalNamespace )
{
- csv_assert( aStack_Namespaces.size() == 0 );
+ csv_assert( aStack_Namespaces.empty() );
aStack_Namespaces.push(&io_rGlobalNamespace);
SetOwner_2CurNamespace();
}
@@ -187,7 +187,7 @@ inline void
ContextForAry::
S_OwnerStack::OpenNamespace( ary::cpp::Namespace & io_rOpenedNamespace )
{
- csv_assert( aStack_Namespaces.size() > 0 OR io_rOpenedNamespace.Parent() == 0 );
+ csv_assert( !aStack_Namespaces.empty() OR io_rOpenedNamespace.Parent() == 0 );
aStack_Namespaces.push(&io_rOpenedNamespace);
SetOwner_2CurNamespace();
}
@@ -228,7 +228,7 @@ inline E_Protection
ContextForAry::
S_OwnerStack::CurProtection() const
{
- return aStack_Classes.size() > 0
+ return !aStack_Classes.empty()
? aStack_Classes.top().second
: ary::cpp::PROTECT_global;
}
@@ -271,15 +271,15 @@ S_OwnerStack::CloseBlock()
}
else
{
- // csv_assert( aStack_Classes.size() == 0 );
- if ( aStack_Classes.size() > 0 )
+ // csv_assert( aStack_Classes.empty() );
+ if ( !aStack_Classes.empty() )
throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
csv_assert( pCurEnum == 0 );
aStack_Namespaces.pop();
- // csv_assert( aStack_Namespaces.size() > 0 );
- if( aStack_Namespaces.size() == 0 )
+ // csv_assert( !aStack_Namespaces.empty() );
+ if( aStack_Namespaces.empty() )
throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
}
@@ -290,12 +290,12 @@ void
ContextForAry::
S_OwnerStack::CloseClass()
{
- // csv_assert( aStack_Classes.size() > 0 );
- if ( aStack_Classes.size() == 0 )
+ // csv_assert( !aStack_Classes.empty() );
+ if ( aStack_Classes.empty() )
throw X_Parser(X_Parser::x_UnspecifiedSyntaxError, "", String::Null_(), 0);
aStack_Classes.pop();
- if ( aStack_Classes.size() > 0 )
+ if ( !aStack_Classes.empty() )
SetOwner_2CurClass();
else
SetOwner_2CurNamespace();
@@ -307,7 +307,7 @@ S_OwnerStack::CloseEnum()
{
csv_assert( pCurEnum != 0 );
pCurEnum = 0;
- if ( aStack_Classes.size() > 0 )
+ if ( !aStack_Classes.empty() )
SetOwner_2CurClass();
else
SetOwner_2CurNamespace();
More information about the Libreoffice-commits
mailing list