summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-26 21:33:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-29 09:56:05 +0100
commitaaae59cbf20136b76c9019a9cbc6766b1e0111b3 (patch)
tree433a50d5f250e880ed4b1daa3414f7d04b428cf1 /basctl
parent67785b74497b96e1ba95279ed63e04278d8e1baf (diff)
looks a bad idea to have asymmetrical const/nonconst 'at's
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/bastypes.cxx29
-rw-r--r--basctl/source/inc/bastypes.hxx27
2 files changed, 21 insertions, 35 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 8546d92ac383..480773f15a21 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -371,24 +371,6 @@ void BreakPointList::ResetHitCount()
}
}
-size_t BreakPointList::size() const
-{
- return maBreakPoints.size();
-}
-
-BreakPoint* BreakPointList::at( size_t i )
-{
- if ( i < maBreakPoints.size() )
- return maBreakPoints[ i ];
- else
- return NULL;
-}
-
-const BreakPoint* BreakPointList::at( size_t i ) const
-{
- return maBreakPoints[ i ];
-}
-
BreakPoint* BreakPointList::remove( BreakPoint* ptr )
{
for ( vector< BreakPoint* >::iterator i = maBreakPoints.begin(); i < maBreakPoints.end(); ++i )
@@ -402,17 +384,6 @@ BreakPoint* BreakPointList::remove( BreakPoint* ptr )
return NULL;
}
-void BreakPointList::push_back( BreakPoint* item )
-{
- maBreakPoints.push_back( item );
-}
-
-void BreakPointList::clear()
-{
- maBreakPoints.clear();
-}
-
-
void IDEBaseWindow::Deactivating()
{
}
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 0e7b639be64e..0b7ede803752 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -128,12 +128,27 @@ public:
void SetBreakPointsInBasic( SbModule* pModule );
void ResetHitCount();
- size_t size() const;
- BreakPoint* at( size_t i );
- const BreakPoint* at( size_t i ) const;
- BreakPoint* remove( BreakPoint* ptr );
- void push_back( BreakPoint* item );
- void clear();
+ size_t size() const
+ {
+ return maBreakPoints.size();
+ }
+ BreakPoint* at( size_t i )
+ {
+ return i < maBreakPoints.size() ? maBreakPoints[ i ] : NULL;
+ }
+ const BreakPoint* at( size_t i ) const
+ {
+ return i < maBreakPoints.size() ? maBreakPoints[ i ] : NULL;
+ }
+ void push_back( BreakPoint* item )
+ {
+ maBreakPoints.push_back( item );
+ }
+ void clear()
+ {
+ maBreakPoints.clear();
+ }
+ BreakPoint* remove( BreakPoint* ptr );
};
// helper class for sorting TabBar