diff --git a/toonz/sources/common/trop/tdistancetransform.cpp b/toonz/sources/common/trop/tdistancetransform.cpp index 0e16f62..f6175e5 100644 --- a/toonz/sources/common/trop/tdistancetransform.cpp +++ b/toonz/sources/common/trop/tdistancetransform.cpp @@ -1,13 +1,10 @@ - +#include #include "tropcm.h" // TnzCore includes #include "traster.h" -// boost includes -#include - // STD includes #include @@ -113,7 +110,7 @@ void expand(int lineLength, int linesCount, // Allocate a buffer equivalent to a dt line. It will store the original // dt values. Final dt values will be written directly on the dt raster. // This is necessary since read and write intervals overlap. - boost::scoped_array dtOriginalLine(new unsigned int[lineLength]); + std::unique_ptr dtOriginalLine(new unsigned[lineLength]); unsigned int *odtLineStart = dtOriginalLine.get(), *odtLineEnd = odtLineStart + lineLength; diff --git a/toonz/sources/include/ext/ttexturesstorage.h b/toonz/sources/include/ext/ttexturesstorage.h index 94beb45..b97a373 100644 --- a/toonz/sources/include/ext/ttexturesstorage.h +++ b/toonz/sources/include/ext/ttexturesstorage.h @@ -1,17 +1,14 @@ - - #ifndef DRAWABLEMESHIMAGE_H #define DRAWABLEMESHIMAGE_H +#include + // TnzExt includes #include "meshtexturizer.h" // TnzCore includes #include "tgldisplaylistsmanager.h" -// Boost includes -#include - #undef DVAPI #undef DVVAR #ifdef TNZEXT_EXPORTS @@ -48,7 +45,7 @@ private: DrawableTextureData &operator=(const DrawableTextureData &); }; -typedef boost::shared_ptr DrawableTextureDataP; +typedef std::shared_ptr DrawableTextureDataP; //*************************************************************************************** // TexturesStorage declaration diff --git a/toonz/sources/include/tools/strokeselection.h b/toonz/sources/include/tools/strokeselection.h index a6391ca..fb5265a 100644 --- a/toonz/sources/include/tools/strokeselection.h +++ b/toonz/sources/include/tools/strokeselection.h @@ -1,8 +1,8 @@ - - #ifndef STROKE_SELECTION_H #define STROKE_SELECTION_H +#include + // TnzQt includes #include "toonzqt/selection.h" @@ -10,9 +10,6 @@ #include "tcommon.h" #include "tvectorimage.h" -// boost includes -#include - // STD includes #include @@ -88,7 +85,7 @@ private: TVectorImageP m_vi; //!< Selected vector image. IndexesContainer m_indexes; //!< Selected stroke indexes in m_vi. - boost::scoped_ptr m_groupCommand; //!< Groups commands wrapper. + std::unique_ptr m_groupCommand; //!< Groups commands wrapper. TSceneHandle *m_sceneHandle; //!< Global scene handle. \deprecated Use TApplication instead. /*!Set this boolean to true before call tool->notifyImageChanged() when you want to reset strokes bbox. diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.h index 70bcb27..045d1df 100644 --- a/toonz/sources/include/toonz/preferences.h +++ b/toonz/sources/include/toonz/preferences.h @@ -1,8 +1,8 @@ - - #ifndef PREFERENCES_H #define PREFERENCES_H +#include + // TnzCore includes #include "tcommon.h" #include "tgeometry.h" @@ -17,9 +17,6 @@ #include #include -// boost includes -#include - #undef DVAPI #undef DVVAR #ifdef TOONZLIB_EXPORTS @@ -431,7 +428,7 @@ public: void startAutoSave(); private: - boost::scoped_ptr m_settings; + std::unique_ptr m_settings; QMap m_languageMaps, m_styleSheetMaps; diff --git a/toonz/sources/include/toonz/txshsimplelevel.h b/toonz/sources/include/toonz/txshsimplelevel.h index 2774172..93eadb1 100644 --- a/toonz/sources/include/toonz/txshsimplelevel.h +++ b/toonz/sources/include/toonz/txshsimplelevel.h @@ -1,8 +1,8 @@ - - #ifndef TXSHSIMPLELEVEL_INCLUDED #define TXSHSIMPLELEVEL_INCLUDED +#include + // TnzLib includes #include "toonz/txshlevel.h" #include "toonz/txshleveltypes.h" @@ -17,7 +17,6 @@ #include // boost includes -#include #include #include @@ -322,10 +321,8 @@ private: typedef boost::container::flat_set FramesSet; private: - boost:: - scoped_ptr m_properties; - boost:: - scoped_ptr m_contentHistory; + std::unique_ptr m_properties; + std::unique_ptr m_contentHistory; TPalette *m_palette; diff --git a/toonz/sources/tnzext/meshtexturizer.cpp b/toonz/sources/tnzext/meshtexturizer.cpp index 576c202..2489872 100644 --- a/toonz/sources/tnzext/meshtexturizer.cpp +++ b/toonz/sources/tnzext/meshtexturizer.cpp @@ -1,4 +1,4 @@ - +#include #include "ext/meshtexturizer.h" @@ -15,10 +15,6 @@ #include "tcg/tcg_list.h" #include "tcg/tcg_misc.h" -// Boost includes -#include -#include - #define COPIED_BORDER 1 // Amount of tile border from the original image #define TRANSP_BORDER 1 // Amount of transparent tile border #define NONPREM_BORDER 1 // Amount of nonpremultiplied copied transparent border @@ -39,7 +35,7 @@ class MeshTexturizer::Imp public: QReadWriteLock m_lock; //!< Lock for synchronized access - tcg::list> m_textureDatas; //!< Pool of texture datas + tcg::list> m_textureDatas; //!< Pool of texture datas public: Imp() : m_lock(QReadWriteLock::Recursive) {} @@ -232,7 +228,7 @@ int MeshTexturizer::bindTexture(const TRaster32P &ras, const TRectD &geom, glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment); // Initialize a new texture data - int dataIdx = m_imp->m_textureDatas.push_back(boost::make_shared(geom)); + int dataIdx = m_imp->m_textureDatas.push_back(std::make_shared(geom)); // Textures must have 2-power sizes. So, let's start with the smallest 2 power // >= ras's sizes. diff --git a/toonz/sources/tnzext/plasticdeformerstorage.cpp b/toonz/sources/tnzext/plasticdeformerstorage.cpp index 8960aa3..b0262ed 100644 --- a/toonz/sources/tnzext/plasticdeformerstorage.cpp +++ b/toonz/sources/tnzext/plasticdeformerstorage.cpp @@ -1,4 +1,4 @@ - +#include // TnzExt includes #include "ext/plasticskeleton.h" @@ -10,9 +10,6 @@ #include // Boost includes -#include -#include - #include #include #include @@ -42,7 +39,7 @@ struct Key { const TMeshImage *m_mi; DeformedSkeleton m_ds; - boost::shared_ptr m_dataGroup; + std::shared_ptr m_dataGroup; public: Key(const TMeshImage *mi, const SkD *sd, int skelId) @@ -472,7 +469,7 @@ PlasticDeformerDataGroup *PlasticDeformerStorage::deformerData( DeformersByKey::iterator dt = m_imp->m_deformers.find(key); if (dt == m_imp->m_deformers.end()) { // No deformer was found. Allocate it. - key.m_dataGroup = boost::make_shared(); + key.m_dataGroup = std::make_shared(); initializeDeformersData(key.m_dataGroup.get(), meshImage); dt = m_imp->m_deformers.insert(key).first; diff --git a/toonz/sources/tnzext/ttexturesstorage.cpp b/toonz/sources/tnzext/ttexturesstorage.cpp index 48e047e..7d369ae 100644 --- a/toonz/sources/tnzext/ttexturesstorage.cpp +++ b/toonz/sources/tnzext/ttexturesstorage.cpp @@ -1,4 +1,4 @@ - +#include // TnzCore includes #include "tgl.h" @@ -9,9 +9,6 @@ // tcg includes #include "tcg/tcg_list.h" -// Boost includes -#include - // Qt includes #include #include @@ -150,7 +147,7 @@ DrawableTextureDataP TTexturesStorage::loadTexture( MeshTexturizer &texturizer = it->second->m_texturizer; - DrawableTextureDataP dataPtr = boost::make_shared(); + DrawableTextureDataP dataPtr = std::make_shared(); DrawableTextureData *data = dataPtr.get(); data->m_dlSpaceId = dlSpaceId; diff --git a/toonz/sources/toonz/cleanuppopup.h b/toonz/sources/toonz/cleanuppopup.h index cef7ffd..349cd3a 100644 --- a/toonz/sources/toonz/cleanuppopup.h +++ b/toonz/sources/toonz/cleanuppopup.h @@ -1,8 +1,8 @@ - - #ifndef CLEANUPPOPUP_H #define CLEANUPPOPUP_H +#include + // TnzQt includes #include "toonzqt/validatedchoicedialog.h" @@ -11,7 +11,6 @@ #include "timage.h" // boost includes -#include #include #include @@ -73,7 +72,7 @@ private: QPushButton *m_cleanupButton; QPushButton *m_skipButton; - boost::scoped_ptr + std::unique_ptr m_updater; //!< The cleanup level updater. bc::vector m_cleanupLevels; //!< List of levels to be cleanupped. @@ -84,10 +83,10 @@ private: std::vector m_cleanuppedLevelFrames; //!< Current level's list of cleanupped frames. Used //! to selectively build the level's unpainted backup. - boost::scoped_ptr + std::unique_ptr m_params; //!< Cleanup params used to cleanup. - boost::scoped_ptr + std::unique_ptr m_overwriteDialog; //!< Dialog about level overwriting options. /* Palette上書きの判断をするために、保存先Levelが既に存在するかどうかのフラグ diff --git a/toonz/sources/toonz/iocommand.cpp b/toonz/sources/toonz/iocommand.cpp index 48396dc..8ab77b4 100644 --- a/toonz/sources/toonz/iocommand.cpp +++ b/toonz/sources/toonz/iocommand.cpp @@ -1,4 +1,4 @@ - +#include #include "iocommand.h" @@ -2177,7 +2177,7 @@ int loadPSDResource(IoCmd::LoadResourceArguments &args, bool updateRecentFile, P typedef IoCmd::LoadResourceArguments::ScopedBlock LoadScopedBlock; struct LoadScopedBlock::Data { - boost::scoped_ptr + std::unique_ptr m_progressDialog; //!< Progress dialog displayed on multiple paths. int m_loadedCount; //!< Number of loaded levels. bool m_hasSoundLevel; //!< Whether a sound level was loaded. diff --git a/toonz/sources/toonz/iocommand.h b/toonz/sources/toonz/iocommand.h index c8b4591..825b8ad 100644 --- a/toonz/sources/toonz/iocommand.h +++ b/toonz/sources/toonz/iocommand.h @@ -1,8 +1,8 @@ - - #ifndef IOCOMMAND_H #define IOCOMMAND_H +#include + // TnzLib includes #include "toonz/preferences.h" @@ -14,7 +14,6 @@ #include // boost includes -#include #include // STD includes @@ -73,7 +72,7 @@ struct LoadResourceArguments { Data &data() const { return *m_data; } //!< Internal data used by the loading procedure. private: - boost::scoped_ptr m_data; + std::unique_ptr m_data; }; struct ResourceData //! Data about a single resource to be loaded. diff --git a/toonz/sources/toonz/vectorizerpopup.h b/toonz/sources/toonz/vectorizerpopup.h index 7de3e4a..75cf3c1 100644 --- a/toonz/sources/toonz/vectorizerpopup.h +++ b/toonz/sources/toonz/vectorizerpopup.h @@ -1,8 +1,8 @@ - - #ifndef VECTORIZERPOPUP_H #define VECTORIZERPOPUP_H +#include + // TnzCore includes #include "tvectorimage.h" @@ -13,9 +13,6 @@ // TnzQt includes #include "toonzqt/dvdialog.h" -// boost includes -#include - // Qt includes #include #include @@ -301,7 +298,7 @@ private: TXshSimpleLevelP m_vLevel; //!< Output vectorized level std::vector m_fids; //!< Frame ids of the input \b m_level - boost::scoped_ptr + std::unique_ptr m_dialog; //!< Dialog to be shown for overwrite resolution. bool m_isCanceled, //!< User cancels set this flag to true