diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-21 20:32:46 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-22 09:03:33 -0500 |
commit | 6087da0dd402013b7d67fe6754081e647fdc5f8c (patch) | |
tree | a7a8971d86e9d8dd3f1d844fa7c22410feb119ff /sax | |
parent | 151beeb0b234512768080da3441ebe40a46cd861 (diff) |
getChar() to return a null-terminated char array.
No need to fetch string size with this change.
Change-Id: Iae5f6c60430fc57985a0fec5bfec59727e5a8f0f
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fastattribs.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx index 17b9a3f6c1fd..ee65cc600c80 100644 --- a/sax/source/tools/fastattribs.cxx +++ b/sax/source/tools/fastattribs.cxx @@ -157,7 +157,7 @@ bool FastAttributeList::getAsDouble( sal_Int32 nToken, double &rDouble) return false; } -bool FastAttributeList::getAsChar( sal_Int32 nToken, const char*& rPos, size_t& rLen ) const +bool FastAttributeList::getAsChar( sal_Int32 nToken, const char*& rPos ) const { for (size_t i = 0, n = maAttributeTokens.size(); i < n; ++i) { @@ -166,12 +166,6 @@ bool FastAttributeList::getAsChar( sal_Int32 nToken, const char*& rPos, size_t& sal_Int32 nOffset = maAttributeValues[i]; rPos = mpChunk + nOffset; - - if (i + 1 < maAttributeValues.size()) - rLen = maAttributeValues[i+1] - nOffset - 1; - else - rLen = mnChunkLength - nOffset - 1; - return true; } |