From 33be1b4f0f60e91a0ad3d945e13a056a6dc8b9ab Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 27 Apr 2013 16:12:47 +0200 Subject: [PATCH] use cast for conv. from shared_ptr to bool ... because std::shared_ptr<>::operator bool is explicit in C++11. --- src/lib/MWAWInputStream.cxx | 2 +- src/lib/MWAWInputStream.hxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/MWAWInputStream.cxx b/src/lib/MWAWInputStream.cxx index 0220f02..5c0bfff 100644 --- a/src/lib/MWAWInputStream.cxx +++ b/src/lib/MWAWInputStream.cxx @@ -583,7 +583,7 @@ bool MWAWInputStream::createStorageOLE() m_storageOLE.reset(new libmwawOLE::Storage(m_stream)); seek(actPos, WPX_SEEK_SET); - return m_storageOLE; + return bool(m_storageOLE); } //////////////////////////////////////////////////////////// diff --git a/src/lib/MWAWInputStream.hxx b/src/lib/MWAWInputStream.hxx index ecdc66c..25a5396 100644 --- a/src/lib/MWAWInputStream.hxx +++ b/src/lib/MWAWInputStream.hxx @@ -170,11 +170,11 @@ public: /** returns true if the data fork block exists */ bool hasDataFork() const { - return m_stream; + return bool(m_stream); } /** returns true if the resource fork block exists */ bool hasResourceFork() const { - return m_resourceFork; + return bool(m_resourceFork); } /** returns the resource fork if find */ shared_ptr getResourceForkStream() { -- 1.8.1.4