diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2011-07-28 16:31:57 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2011-07-29 17:32:41 +0200 |
commit | f6b6f0b244013f54663294cc26258777e795f1cd (patch) | |
tree | b8d585b079329635816d07ac4e2b3b4ec5b19e82 /writerfilter | |
parent | avoid sending duplicated paragraph flags (diff) | |
download | core-f6b6f0b244013f54663294cc26258777e795f1cd.tar.gz core-f6b6f0b244013f54663294cc26258777e795f1cd.zip |
RTFSprms::erase: use return value to signal if the call was a noop
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfsprm.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsprm.hxx | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx index cdeae22eddb0..976505f78292 100644 --- a/writerfilter/source/rtftok/rtfsprm.cxx +++ b/writerfilter/source/rtftok/rtfsprm.cxx @@ -105,14 +105,15 @@ RTFValue::Pointer_t RTFSprms::find(Id nKeyword) return pValue; } -void RTFSprms::erase(Id nKeyword) +bool RTFSprms::erase(Id nKeyword) { for (RTFSprms::Iterator_t i = m_aSprms.begin(); i != m_aSprms.end(); ++i) if (i->first == nKeyword) { m_aSprms.erase(i); - return; + return true; } + return false; } RTFSprms::RTFSprms() diff --git a/writerfilter/source/rtftok/rtfsprm.hxx b/writerfilter/source/rtftok/rtfsprm.hxx index 96e23f3dba8c..1f3472083dad 100644 --- a/writerfilter/source/rtftok/rtfsprm.hxx +++ b/writerfilter/source/rtftok/rtfsprm.hxx @@ -45,7 +45,7 @@ namespace writerfilter { RTFSprms(const RTFSprms& rSprms); std::vector< std::pair<Id, RTFValue::Pointer_t> >* operator->(); RTFValue::Pointer_t find(Id nKeyword); - void erase(Id nKeyword); + bool erase(Id nKeyword); private: std::vector< std::pair<Id, RTFValue::Pointer_t> > m_aSprms; }; |