From e87071ac57a7711078715d9165c264ec3db180ab Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Mon, 16 Jan 2017 19:47:20 +0100 Subject: replace boost::checked_deleter with std::default_delete and remove all traces of boost/checked_delete.hpp Change-Id: I4486d0e07a7197d75f8739c8c6d79670163eaab2 Reviewed-on: https://gerrit.libreoffice.org/33182 Tested-by: Jenkins Reviewed-by: Jochen Nitschke --- chart2/inc/pch/precompiled_chartcontroller.hxx | 1 - chart2/inc/pch/precompiled_chartcore.hxx | 1 - .../RegressionCurveItemConverter.cxx | 2 -- chart2/source/view/main/GL3DRenderer.cxx | 1 - external/boost/include/boost/checked_delete.hpp | 23 ---------------------- package/Library_xstor.mk | 2 -- package/inc/pch/precompiled_xstor.hxx | 1 - package/source/xstor/xstorage.cxx | 6 ++---- sc/inc/pch/precompiled_sc.hxx | 1 - sc/inc/pch/precompiled_scfilt.hxx | 1 - sc/source/core/data/column.cxx | 3 +-- sc/source/core/data/columnspanset.cxx | 4 ++-- sc/source/core/data/document.cxx | 3 +-- sc/source/core/data/dptabres.cxx | 5 ++--- sc/source/core/data/table3.cxx | 3 +-- sc/source/core/tool/chartlis.cxx | 4 +--- sc/source/core/tool/rangelst.cxx | 6 +++--- sc/source/filter/xcl97/xcl97rec.cxx | 3 +-- sc/source/ui/unoobj/chart2uno.cxx | 3 +-- sc/source/ui/view/viewdata.cxx | 3 +-- starmath/inc/pch/precompiled_sm.hxx | 1 - starmath/source/node.cxx | 3 +-- tools/inc/pch/precompiled_tl.hxx | 1 - tools/source/fsys/urlobj.cxx | 3 +-- 24 files changed, 18 insertions(+), 66 deletions(-) delete mode 100644 external/boost/include/boost/checked_delete.hpp diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index 458f9b952255..afdaf38929dc 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx index 908d7acb4216..3f066bae8e65 100644 --- a/chart2/inc/pch/precompiled_chartcore.hxx +++ b/chart2/inc/pch/precompiled_chartcore.hxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx index e4ac94260d0b..773d24e443b2 100644 --- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx @@ -34,8 +34,6 @@ #include #include -#include - using namespace ::com::sun::star; namespace diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index e1e4c01673e8..c00bd18f6521 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -19,7 +19,6 @@ #include #include "glm/gtc/matrix_inverse.hpp" -#include #include #define DEBUG_FBO 0 diff --git a/external/boost/include/boost/checked_delete.hpp b/external/boost/include/boost/checked_delete.hpp deleted file mode 100644 index 1fb5927e8945..000000000000 --- a/external/boost/include/boost/checked_delete.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* generated by bin/gen-boost-headers, do not edit! */ -#pragma once -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunknown-pragmas" /* first! for clang */ -#pragma GCC diagnostic ignored "-Wpragmas" /* second! for GCC */ -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wextra" -#pragma GCC diagnostic ignored "-Wignored-qualifiers" -#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" -#pragma GCC diagnostic ignored "-Winvalid-constexpr" -#pragma GCC diagnostic ignored "-Wplacement-new" -#pragma GCC diagnostic ignored "-Wreturn-type" -#pragma GCC diagnostic ignored "-Wshadow" -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#pragma GCC diagnostic ignored "-Wtype-limits" -#pragma GCC diagnostic ignored "-Wundef" -#pragma GCC diagnostic ignored "-Wunused-local-typedefs" -#pragma GCC diagnostic ignored "-Wunused-macros" -#pragma GCC diagnostic ignored "-Wunused-parameter" -#pragma GCC diagnostic ignored "-Wunused-variable" -#include_next -#pragma GCC diagnostic pop diff --git a/package/Library_xstor.mk b/package/Library_xstor.mk index 612ae0ae0484..29514321962e 100644 --- a/package/Library_xstor.mk +++ b/package/Library_xstor.mk @@ -16,8 +16,6 @@ $(eval $(call gb_Library_set_include,xstor,\ -I$(SRCDIR)/package/inc \ )) -$(eval $(call gb_Library_use_external,xstor,boost_headers)) - $(eval $(call gb_Library_set_precompiled_header,xstor,$(SRCDIR)/package/inc/pch/precompiled_xstor)) $(eval $(call gb_Library_use_sdk_api,xstor)) diff --git a/package/inc/pch/precompiled_xstor.hxx b/package/inc/pch/precompiled_xstor.hxx index ec4bc6359ce6..941d290cbffa 100644 --- a/package/inc/pch/precompiled_xstor.hxx +++ b/package/inc/pch/precompiled_xstor.hxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 68f47a89db85..21ac47d5c150 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -57,8 +57,6 @@ #include "switchpersistencestream.hxx" #include "ohierarchyholder.hxx" -#include - using namespace ::com::sun::star; #if OSL_DEBUG_LEVEL > 0 @@ -337,10 +335,10 @@ OStorage_Impl::~OStorage_Impl() m_pParent = nullptr; } - std::for_each(m_aChildrenList.begin(), m_aChildrenList.end(), boost::checked_deleter()); + std::for_each(m_aChildrenList.begin(), m_aChildrenList.end(), std::default_delete()); m_aChildrenList.clear(); - std::for_each(m_aDeletedList.begin(), m_aDeletedList.end(), boost::checked_deleter()); + std::for_each(m_aDeletedList.begin(), m_aDeletedList.end(), std::default_delete()); m_aDeletedList.clear(); if ( m_nStorageType == embed::StorageFormats::OFOPXML && m_pRelStorElement ) diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index 986f9e30cbd0..643a525c9e7c 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/sc/inc/pch/precompiled_scfilt.hxx b/sc/inc/pch/precompiled_scfilt.hxx index 58908fb4fd0d..9048a2cca156 100644 --- a/sc/inc/pch/precompiled_scfilt.hxx +++ b/sc/inc/pch/precompiled_scfilt.hxx @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index beb758a9aac9..af35e8ccfe8a 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -58,7 +58,6 @@ #include #include #include -#include #include using ::editeng::SvxBorderLine; @@ -2254,7 +2253,7 @@ class UpdateRefOnNonCopy : public std::unary_functionSetFormulaCells(rOldPos, aCells)) // Insertion failed. Delete all formula cells. - std::for_each(aCells.begin(), aCells.end(), boost::checked_deleter()); + std::for_each(aCells.begin(), aCells.end(), std::default_delete()); } public: diff --git a/sc/source/core/data/columnspanset.cxx b/sc/source/core/data/columnspanset.cxx index efb79d0ea094..acefdb236dee 100644 --- a/sc/source/core/data/columnspanset.cxx +++ b/sc/source/core/data/columnspanset.cxx @@ -15,9 +15,9 @@ #include "markdata.hxx" #include "rangelst.hxx" #include -#include #include +#include namespace sc { @@ -67,7 +67,7 @@ ColumnSpanSet::~ColumnSpanSet() if (!pTab) continue; - std::for_each(pTab->begin(), pTab->end(), boost::checked_deleter()); + std::for_each(pTab->begin(), pTab->end(), std::default_delete()); delete pTab; } } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index f486e28139be..f02c8a39b273 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -104,7 +104,6 @@ #include #include #include -#include #include #include @@ -832,7 +831,7 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets ) TableContainer::iterator it = maTabs.begin() + nTab; TableContainer::iterator itEnd = it + nSheets; - std::for_each(it, itEnd, boost::checked_deleter()); + std::for_each(it, itEnd, std::default_delete()); maTabs.erase(it, itEnd); // UpdateBroadcastAreas must be called between UpdateDeleteTab, // which ends listening, and StartAllListeners, to not modify diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index a98d800078d6..0d2c3732f5c3 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -39,7 +39,6 @@ #include #include #include -#include #include #include @@ -760,7 +759,7 @@ ScDPResultData::ScDPResultData( ScDPSource& rSrc ) : ScDPResultData::~ScDPResultData() { - std::for_each(maDimMembers.begin(), maDimMembers.end(), boost::checked_deleter()); + std::for_each(maDimMembers.begin(), maDimMembers.end(), std::default_delete()); } void ScDPResultData::SetMeasureData( @@ -3545,7 +3544,7 @@ ScDPDataDimension::ScDPDataDimension( const ScDPResultData* pData ) : ScDPDataDimension::~ScDPDataDimension() { - std::for_each(maMembers.begin(), maMembers.end(), boost::checked_deleter()); + std::for_each(maMembers.begin(), maMembers.end(), std::default_delete()); } void ScDPDataDimension::InitFrom( const ScDPResultDimension* pDim ) diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index fcd6984f650d..64c082b1fc61 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -69,7 +69,6 @@ #include #include #include -#include #include #include @@ -300,7 +299,7 @@ public: } if (mpRows) - std::for_each(mpRows->begin(), mpRows->end(), boost::checked_deleter()); + std::for_each(mpRows->begin(), mpRows->end(), std::default_delete()); } void SetKeepQuery( bool b ) { mbKeepQuery = b; } diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index c159f397355a..9bbd432a6e05 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -24,8 +24,6 @@ #include "document.hxx" #include "reftokenhelper.hxx" -#include - using namespace com::sun::star; using ::std::vector; using ::std::unary_function; @@ -591,7 +589,7 @@ void ScChartListenerCollection::FreeUno( const uno::Reference< chart::XChartData std::for_each(aUsed.begin(), aUsed.end(), InsertChartListener(m_Listeners)); // Now, delete the ones no longer needed. - std::for_each(aUnused.begin(), aUnused.end(), boost::checked_deleter()); + std::for_each(aUnused.begin(), aUnused.end(), std::default_delete()); } void ScChartListenerCollection::StartTimer() diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 8c40bf4fbe97..8370f2d0ca71 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -26,8 +26,8 @@ #include "refupdat.hxx" #include "rechead.hxx" #include "compiler.hxx" -#include #include +#include using ::std::vector; using ::std::advance; @@ -1091,7 +1091,7 @@ void ScRangeList::Remove(size_t nPos) void ScRangeList::RemoveAll() { - for_each(maRanges.begin(), maRanges.end(), boost::checked_deleter()); + for_each(maRanges.begin(), maRanges.end(), std::default_delete()); maRanges.clear(); } @@ -1222,7 +1222,7 @@ ScRangeList ScRangeList::GetIntersectedRange(const ScRange& rRange) const // ScRangePairList ScRangePairList::~ScRangePairList() { - for_each( maPairs.begin(), maPairs.end(), boost::checked_deleter() ); + for_each( maPairs.begin(), maPairs.end(), std::default_delete() ); maPairs.clear(); } diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 66c18054dbb4..3c94c058e291 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -77,7 +77,6 @@ #include #include -#include #include using namespace ::com::sun::star; @@ -108,7 +107,7 @@ XclExpObjList::XclExpObjList( const XclExpRoot& rRoot, XclEscherEx& rEscherEx ) XclExpObjList::~XclExpObjList() { - std::for_each(maObjs.begin(), maObjs.end(), boost::checked_deleter()); + std::for_each(maObjs.begin(), maObjs.end(), std::default_delete()); delete pMsodrawingPerSheet; delete pSolverContainer; } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 5ff63561eae9..582b0c6d136a 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -60,7 +60,6 @@ #include #include -#include SC_SIMPLE_SERVICE_INFO( ScChart2DataProvider, "ScChart2DataProvider", "com.sun.star.chart2.data.DataProvider") @@ -163,7 +162,7 @@ struct TokenTable } void clear() { - std::for_each(maTokens.begin(), maTokens.end(), boost::checked_deleter()); + std::for_each(maTokens.begin(), maTokens.end(), std::default_delete()); } void push_back( FormulaToken* pToken ) diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index b5ead95f4a98..67a220886fa6 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -59,7 +59,6 @@ #include "ViewSettingsSequenceDefines.hxx" #include #include -#include #include #include #include @@ -498,7 +497,7 @@ ScViewData::~ScViewData() KillEditView(); delete pOptions; ::std::for_each( - maTabData.begin(), maTabData.end(), boost::checked_deleter()); + maTabData.begin(), maTabData.end(), std::default_delete()); } void ScViewData::UpdateCurrentTab() diff --git a/starmath/inc/pch/precompiled_sm.hxx b/starmath/inc/pch/precompiled_sm.hxx index d63c2f0ad3d5..785e752bb27f 100644 --- a/starmath/inc/pch/precompiled_sm.hxx +++ b/starmath/inc/pch/precompiled_sm.hxx @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index e941c2d49e30..a30dc3e38da0 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -39,7 +39,6 @@ #include #include #include -#include namespace { @@ -374,7 +373,7 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(sal_Int32 nAccIdx) const SmStructureNode::~SmStructureNode() { - ForEachNonNull(this, boost::checked_deleter()); + ForEachNonNull(this, std::default_delete()); } diff --git a/tools/inc/pch/precompiled_tl.hxx b/tools/inc/pch/precompiled_tl.hxx index 6c7371894295..c906f41f3e52 100644 --- a/tools/inc/pch/precompiled_tl.hxx +++ b/tools/inc/pch/precompiled_tl.hxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index b84142806b54..55caad880d55 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -19,7 +19,6 @@ #include -#include #include #include #include @@ -564,7 +563,7 @@ namespace { std::unique_ptr memoryStream( void const * data, sal_Int32 length) { - std::unique_ptr > b( + std::unique_ptr b( new char[length]); memcpy(b.get(), data, length); std::unique_ptr s( -- cgit