diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-09 18:02:59 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-10 15:27:16 +0200 |
commit | 49a0203e7aa3a98bbed4412ab4364614505f88eb (patch) | |
tree | a0e37b853314780887d228d55842092c187ae382 /external | |
parent | a4970f4eeb94b8c405c5e3ec094d47061253efac (diff) |
librevenge: upgrade to 0.0.5
* Add C2039-unique-shared_ptr.patch.0 to fix
C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/librevenge/src/lib/RVNGBinaryData.cpp(96): error C2039: 'unique': is not a member of 'std::shared_ptr<librevenge::`anonymous-namespace'::DataImpl>'
C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/librevenge/src/lib/RVNGBinaryData.cpp(86): note: see declaration of 'std::shared_ptr<librevenge::`anonymous-namespace'::DataImpl>'
make[1]: *** [C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/solenv/gbuild/LinkTarget.mk:398: C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/GenCxxObject/UnpackedTarball/librevenge/src/lib/RVNGBinaryData.o] Error 2
on Windows
Change-Id: I31023633426fc902e2298c696826d8371bb4d63b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167388
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'external')
-rw-r--r-- | external/librevenge/C2039-unique-shared_ptr.patch.0 | 11 | ||||
-rw-r--r-- | external/librevenge/UnpackedTarball_librevenge.mk | 1 | ||||
-rw-r--r-- | external/librevenge/tdf63130-improve-perf.patch.0 | 16 |
3 files changed, 20 insertions, 8 deletions
diff --git a/external/librevenge/C2039-unique-shared_ptr.patch.0 b/external/librevenge/C2039-unique-shared_ptr.patch.0 new file mode 100644 index 000000000000..0dcec5058e89 --- /dev/null +++ b/external/librevenge/C2039-unique-shared_ptr.patch.0 @@ -0,0 +1,11 @@ +--- src/lib/RVNGBinaryData.cpp 2024-05-10 13:20:09.278288686 +0200 ++++ src/lib/RVNGBinaryData.cpp 2024-05-10 13:23:14.365139906 +0200 +@@ -93,7 +93,7 @@ + + void RVNGBinaryDataImpl::makeUnique() + { +- if (!m_ptr.unique()) ++ if (!(m_ptr.use_count() == 1)) + { + std::shared_ptr<DataImpl> ptr(new DataImpl()); + ptr->m_buf = m_ptr->m_buf; diff --git a/external/librevenge/UnpackedTarball_librevenge.mk b/external/librevenge/UnpackedTarball_librevenge.mk index 5fcc2e33b060..316e961bd1ba 100644 --- a/external/librevenge/UnpackedTarball_librevenge.mk +++ b/external/librevenge/UnpackedTarball_librevenge.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,librevenge,0)) $(eval $(call gb_UnpackedTarball_add_patches,librevenge, \ external/librevenge/rpath.patch \ external/librevenge/tdf63130-improve-perf.patch.0 \ + external/librevenge/C2039-unique-shared_ptr.patch.0 \ )) ifneq ($(OS),MACOSX) diff --git a/external/librevenge/tdf63130-improve-perf.patch.0 b/external/librevenge/tdf63130-improve-perf.patch.0 index 02a8a6e1f94b..f8b972217c76 100644 --- a/external/librevenge/tdf63130-improve-perf.patch.0 +++ b/external/librevenge/tdf63130-improve-perf.patch.0 @@ -18,7 +18,7 @@ /** Create a new string from \a s as escaped XML. --- src/lib/RVNGBinaryData.cpp 2023-05-17 15:48:15.373159469 +0200 +++ src/lib/RVNGBinaryData.cpp 2023-05-17 15:49:00.773411873 +0200 -@@ -67,9 +67,9 @@ +@@ -68,9 +68,9 @@ boost::archive::iterators::transform_width<std::vector<unsigned char>::const_iterator, 6, 8 > > base64_encoder; // Encode the buffer and create a string @@ -30,14 +30,14 @@ result.append(numPadding, '='); // add '=' for each padded character } -@@ -150,10 +150,10 @@ +@@ -153,10 +153,10 @@ { m_binaryDataImpl->makeUnique(); - unsigned long previousSize = m_binaryDataImpl->m_ptr->m_buf.size(); - m_binaryDataImpl->m_ptr->m_buf.reserve(previousSize + data.m_binaryDataImpl->m_ptr->m_buf.size()); -- for (unsigned long i = 0; i < data.m_binaryDataImpl->m_ptr->m_buf.size(); i++) -- m_binaryDataImpl->m_ptr->m_buf.push_back(data.m_binaryDataImpl->m_ptr->m_buf[i]); +- const auto &src = data.m_binaryDataImpl->m_ptr->m_buf; +- std::copy(src.begin(), src.end(), std::back_inserter(m_binaryDataImpl->m_ptr->m_buf)); + m_binaryDataImpl->m_ptr->m_buf.insert( + m_binaryDataImpl->m_ptr->m_buf.end(), + data.m_binaryDataImpl->m_ptr->m_buf.begin(), @@ -45,7 +45,7 @@ } void RVNGBinaryData::appendBase64Data(const RVNGString &base64) -@@ -231,8 +231,9 @@ +@@ -234,8 +234,9 @@ const RVNGString RVNGBinaryData::getBase64Data() const { std::string base64; @@ -58,7 +58,7 @@ RVNGInputStream *RVNGBinaryData::getDataStream() const --- src/lib/RVNGString.cpp 2023-05-17 15:48:15.373159469 +0200 +++ src/lib/RVNGString.cpp 2023-05-17 15:49:00.773411873 +0200 -@@ -73,6 +73,7 @@ +@@ -76,6 +76,7 @@ { public: RVNGStringImpl() : m_buf() {} @@ -66,8 +66,8 @@ bool empty() const { return m_buf.empty(); -@@ -157,6 +158,11 @@ - m_stringImpl->m_buf = str; +@@ -200,6 +201,11 @@ + m_stringImpl->append(str); } +RVNGString::RVNGString(std::string&& str) : |