summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2018-03-24 16:32:04 +0100
committerDavid Tardon <dtardon@redhat.com>2018-03-24 16:35:05 +0100
commitcf5bfaf2991c0c0ef37d2968ff2cf756b0b02089 (patch)
tree18c38a8cd0dd4f0be65bc5d40c2e9ed4f56217ed
parente63456225d2953fb9dab8607fb74776a7eb7725f (diff)
these functions cannot throw any exception
-rw-r--r--src/lib/SW602MemoryStream.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/SW602MemoryStream.cpp b/src/lib/SW602MemoryStream.cpp
index 550e4a5..c10faf0 100644
--- a/src/lib/SW602MemoryStream.cpp
+++ b/src/lib/SW602MemoryStream.cpp
@@ -59,7 +59,7 @@ librevenge::RVNGInputStream *SW602MemoryStream::getSubStreamById(unsigned)
return 0;
}
-const unsigned char *SW602MemoryStream::read(unsigned long numBytes, unsigned long &numBytesRead) try
+const unsigned char *SW602MemoryStream::read(unsigned long numBytes, unsigned long &numBytesRead)
{
numBytesRead = 0;
@@ -75,12 +75,8 @@ const unsigned char *SW602MemoryStream::read(unsigned long numBytes, unsigned lo
numBytesRead = numBytes;
return m_data + oldPos;
}
-catch (...)
-{
- return 0;
-}
-int SW602MemoryStream::seek(const long offset, librevenge::RVNG_SEEK_TYPE seekType) try
+int SW602MemoryStream::seek(const long offset, librevenge::RVNG_SEEK_TYPE seekType)
{
long pos = 0;
switch (seekType)
@@ -104,10 +100,6 @@ int SW602MemoryStream::seek(const long offset, librevenge::RVNG_SEEK_TYPE seekTy
m_pos = pos;
return 0;
}
-catch (...)
-{
- return -1;
-}
long SW602MemoryStream::tell()
{