OSDN Git Service

Use std::unique_ptr/shared_ptr instead of boost::scoped_ptr/scoped_array/shared_ptr
authorsdottaka <sdottaka@users.sourceforge.net>
Fri, 28 Nov 2014 12:29:52 +0000 (21:29 +0900)
committersdottaka <sdottaka@users.sourceforge.net>
Fri, 28 Nov 2014 12:29:52 +0000 (21:29 +0900)
--HG--
branch : stable

48 files changed:
Src/Common/Bitmap.cpp
Src/Common/DragDrop.cpp
Src/Common/ExConverter.cpp
Src/Common/UniFile.cpp
Src/Common/multiformatText.cpp
Src/Common/unicoder.cpp
Src/Common/version.h
Src/CompareEngines/ByteCompare.cpp
Src/CompareEngines/ByteCompare.h
Src/CompareEngines/DiffUtils.cpp
Src/CompareEngines/DiffUtils.h
Src/ConfigLog.cpp
Src/ConfigLog.h
Src/DiffContext.cpp
Src/DiffContext.h
Src/DiffFileData.cpp
Src/DiffThread.h
Src/DiffWrapper.cpp
Src/DiffWrapper.h
Src/DirDoc.cpp
Src/DirDoc.h
Src/DirItem.cpp
Src/DirScan.cpp
Src/DirView.cpp
Src/DirView.h
Src/EditorFilepathBar.cpp
Src/EditorFilepathBar.h
Src/FileActionScript.h
Src/FileFilter.h
Src/FileFilterHelper.cpp
Src/FileFilterHelper.h
Src/FilterList.h
Src/FolderCmp.cpp
Src/FolderCmp.h
Src/LineFiltersList.h
Src/LocationView.cpp
Src/LocationView.h
Src/MainFrm.cpp
Src/MainFrm.h
Src/Merge.h
Src/MergeDoc.h
Src/MergeDocLineDiffs.cpp
Src/PluginManager.h
Src/Plugins.h
Src/SelectUnpackerDlg.h
Src/UniMarkdownFile.cpp
Src/UniMarkdownFile.h
Src/codepage_detect.cpp

index 9b8d5ae..258cf8c 100644 (file)
@@ -10,7 +10,7 @@
 #include "StdAfx.h"
 #include "Bitmap.h"
 #include <cmath>
-#include <boost/scoped_array.hpp>
+#include <memory>
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -88,7 +88,7 @@ CBitmap *GetDarkenedBitmap(CDC *pDC, CBitmap *pBitmap)
        bi.bmiHeader.biClrUsed = 0;
        bi.bmiHeader.biClrImportant = 0;
 
-       boost::scoped_array<BYTE> pbuf(new BYTE[bi.bmiHeader.biSizeImage]);
+       std::unique_ptr<BYTE[]> pbuf(new BYTE[bi.bmiHeader.biSizeImage]);
        GetDIBits(dcMem.m_hDC, (HBITMAP)*pBitmapDarkened, 0, bm.bmHeight, pbuf.get(), &bi, DIB_RGB_COLORS);
 
        int x;
index 4fa7604..65f4b08 100644 (file)
@@ -1,5 +1,5 @@
 #include "DragDrop.h"
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "paths.h"
 
 //
@@ -24,7 +24,7 @@ bool GetDroppedFiles(HDROP dropInfo, std::vector<String>& files)
 
                // Allocate memory to contain full pathname & zero byte
                wPathnameSize += 1;
-               boost::scoped_array<TCHAR> npszFile(new TCHAR[wPathnameSize]);
+               std::unique_ptr<TCHAR[]> npszFile(new TCHAR[wPathnameSize]);
 
                // Copy the pathname into the buffer
                DragQueryFile(dropInfo, x, npszFile.get(), wPathnameSize);
index 510b7f2..b8968c1 100644 (file)
@@ -9,7 +9,7 @@
 #include "ExConverter.h"
 #include <windows.h>
 #include <mlang.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "unicoder.h"
 #include "codepage.h"
 
@@ -100,7 +100,7 @@ public:
                else
                {
                        size_t wsize = *srcbytes * 2 + 6;
-                       boost::scoped_array<wchar_t> pbuf(new wchar_t[wsize]);
+                       std::unique_ptr<wchar_t[]> pbuf(new wchar_t[wsize]);
                        bsucceeded = convertToUnicode(srcCodepage, (const char *)src, srcbytes, pbuf.get(), &wsize);
                        if (!bsucceeded)
                        {
@@ -148,7 +148,7 @@ public:
                        return defcodepage;
                srcsize = static_cast<UINT>(size);
                dstsize = static_cast<UINT>(size * sizeof(wchar_t));
-               boost::scoped_array<unsigned char> pdst(new unsigned char[size * sizeof(wchar_t)]);
+               std::unique_ptr<unsigned char[]> pdst(new unsigned char[size * sizeof(wchar_t)]);
                SetLastError(0);
                hr = pcc->DoConversion((unsigned char *)data, &srcsize, pdst.get(), &dstsize);
                pcc->GetSourceCodePage((unsigned *)&codepage);
index 2c1d8f9..3d4f976 100644 (file)
@@ -35,7 +35,7 @@ THE SOFTWARE.
 #include <cassert>
 #include <Poco/SharedMemory.h>
 #include <Poco/Exception.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "UnicodeString.h"
 #include "unicoder.h"
 #include "paths.h" // paths_GetLongbPath()
@@ -827,7 +827,7 @@ bool UniStdioFile::ReadBom()
 
        // Read 8 KB at max for get enough data determining UTF-8 without BOM.
        const int max_size = 8 * 1024;
-       boost::scoped_array<unsigned char> buff(new unsigned char[max_size]);
+       std::unique_ptr<unsigned char[]> buff(new unsigned char[max_size]);
 
        size_t bytes = fread(&buff[0], 1, max_size, m_fp);
        m_data = 0;
index caf5a3a..5257ed8 100644 (file)
@@ -34,8 +34,7 @@
 #include <algorithm>
 #include <cstring>
 #include <cassert>
-#include <boost/scoped_array.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include <Poco/SharedMemory.h>
 #include <Poco/FileStream.h>
 #include <Poco/ByteOrder.h>
@@ -235,7 +234,7 @@ const TCHAR *storageForPlugins::GetDataFileUnicode()
        try
        {
                {
-                       boost::scoped_ptr<SharedMemory> pshmIn;
+                       std::unique_ptr<SharedMemory> pshmIn;
                        // Get source data
                        if (m_bCurrentIsFile)
                        {
@@ -320,7 +319,7 @@ BSTR * storageForPlugins::GetDataBufferUnicode()
        try
        {
                {
-                       boost::scoped_ptr<SharedMemory> pshmIn;
+                       std::unique_ptr<SharedMemory> pshmIn;
                        // Get source data
                        if (m_bCurrentIsFile) 
                        {
@@ -351,7 +350,7 @@ BSTR * storageForPlugins::GetDataBufferUnicode()
                        int textRealSize = textForeseenSize;
 
                        // allocate the memory
-                       boost::scoped_array<wchar_t> tempBSTR(new wchar_t[textForeseenSize]);
+                       std::unique_ptr<wchar_t[]> tempBSTR(new wchar_t[textForeseenSize]);
 
                        // fill in the data
                        wchar_t * pbstrBuffer = tempBSTR.get();
@@ -394,7 +393,7 @@ const TCHAR *storageForPlugins::GetDataFileAnsi()
        try
        {
                {
-                       boost::scoped_ptr<SharedMemory> pshmIn;
+                       std::unique_ptr<SharedMemory> pshmIn;
                        // Get source data
                        if (m_bCurrentIsFile)
                        {
@@ -487,7 +486,7 @@ VARIANT * storageForPlugins::GetDataBufferAnsi()
        try
        {
                {
-                       boost::scoped_ptr<SharedMemory> pshmIn;
+                       std::unique_ptr<SharedMemory> pshmIn;
                        // Get source data
                        if (m_bCurrentIsFile) 
                        {
index 254dfdd..edfe9e8 100644 (file)
@@ -20,7 +20,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
 #include <windows.h>
 #include <tchar.h>
 #include <cassert>
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include <Poco/UnicodeConverter.h>
 #include "UnicodeString.h"
 #include "ExConverter.h"
@@ -717,7 +717,7 @@ int CrossConvert(const char* src, unsigned srclen, char* dest, unsigned destsize
        // Convert input to Unicode, using specified codepage
        DWORD flags = 0;
        int wlen = srclen * 2 + 6;
-       boost::scoped_array<wchar_t> wbuff(new wchar_t[wlen]);
+       std::unique_ptr<wchar_t[]> wbuff(new wchar_t[wlen]);
        int n;
        if (cpin == CP_UCS2LE)
        {
index a4c441c..01debe4 100644 (file)
@@ -10,7 +10,7 @@
 #define VERSIONTOOLS_H
 
 #include <shlwapi.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "UnicodeString.h"
 
 /**
@@ -25,7 +25,7 @@ class CVersionInfo
 {
 private:
        VS_FIXEDFILEINFO m_FixedFileInfo; /**< Fixed file information */
-       boost::scoped_array<BYTE> m_pVffInfo; /**< Pointer to version information block */
+       std::unique_ptr<BYTE[]> m_pVffInfo; /**< Pointer to version information block */
        BOOL m_bVersionOnly; /**< Ask version numbers only */
        BOOL m_bDllVersion; /**< Dll file version is being queried */
        WORD m_wLanguage; /**< Language-ID to use (if given) */
index 11b075a..ad73bce 100644 (file)
@@ -39,9 +39,9 @@ static void CopyTextStats(const FileTextStats * stats, FileTextStats * myTextSta
  * @brief Default constructor.
  */
 ByteCompare::ByteCompare()
-               : m_pOptions(NULL)
-               , m_piAbortable(NULL)
-               , m_inf(NULL)
+               : m_pOptions(nullptr)
+               , m_piAbortable(nullptr)
+               , m_inf(nullptr)
 {
 }
 
index e0248e7..8dc6725 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef _BYTE_COMPARE_H_
 #define _BYTE_COMPARE_H_
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "FileTextStats.h"
 
 class CompareOptions;
@@ -40,7 +40,7 @@ public:
        void GetTextStats(int side, FileTextStats *stats) const;
 
 private:
-       boost::scoped_ptr<QuickCompareOptions> m_pOptions; /**< Compare options for diffutils. */
+       std::unique_ptr<QuickCompareOptions> m_pOptions; /**< Compare options for diffutils. */
        IAbortable * m_piAbortable;
        file_data * m_inf; /**< Compared files data (for diffutils). */
        FileTextStats m_textStats[2];
index e491f9b..bad34ed 100644 (file)
@@ -31,9 +31,9 @@ static void CopyTextStats(const file_data * inf, FileTextStats * myTextStats);
  * @brief Default constructor.
  */
 DiffUtils::DiffUtils()
-               : m_pOptions(NULL)
-               , m_pFilterList(NULL)
-               , m_inf(NULL)
+               : m_pOptions(nullptr)
+               , m_pFilterList(nullptr)
+               , m_inf(nullptr)
                , m_FilterCommentsManager(new ::FilterCommentsManager)
                , m_pDiffWrapper(new ::CDiffWrapper)
                , m_ndiffs(0)
index 5b4a589..fb7e8ed 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _DIFF_UTILS_H_
 #define _DIFF_UTILS_H_
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 class CompareOptions;
 class FilterList;
@@ -49,14 +49,14 @@ public:
        void SetCodepage(int codepage) { m_codepage = codepage; }
 
 private:
-       boost::scoped_ptr<DiffutilsOptions> m_pOptions; /**< Compare options for diffutils. */
+       std::unique_ptr<DiffutilsOptions> m_pOptions; /**< Compare options for diffutils. */
        FilterList * m_pFilterList; /**< Filter list for line filters. */
        file_data * m_inf; /**< Compared files data (for diffutils). */
        int m_ndiffs; /**< Real diffs found. */
        int m_ntrivialdiffs; /**< Ignored diffs found. */
        int m_codepage; /**< Codepage used in line filter */
-       boost::scoped_ptr<FilterCommentsManager> m_FilterCommentsManager; /**< Comments filtering manager */
-       boost::scoped_ptr<CDiffWrapper> m_pDiffWrapper;
+       std::unique_ptr<FilterCommentsManager> m_FilterCommentsManager; /**< Comments filtering manager */
+       std::unique_ptr<CDiffWrapper> m_pDiffWrapper;
 };
 
 
index c0f0a13..64a720c 100644 (file)
@@ -26,7 +26,7 @@
 #include <cassert>
 #include <windows.h>
 #include <mbctype.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "Constants.h"
 #include "version.h"
 #include "UniFile.h"
@@ -230,7 +230,7 @@ void CConfigLog::WriteArchiveSupport()
        if (DWORD cchPath = GetEnvironmentVariable(_T("path"), 0, 0))
        {
                static const TCHAR cSep[] = _T(";");
-               boost::scoped_array<TCHAR> pchPath(new TCHAR[cchPath]);
+               std::unique_ptr<TCHAR[]> pchPath(new TCHAR[cchPath]);
                GetEnvironmentVariable(_T("PATH"), pchPath.get(), cchPath);
                LPTSTR pchItem = &pchPath[0];
                while (int cchItem = StrCSpn(pchItem += StrSpn(pchItem, cSep), cSep))
index 028e254..199ecc2 100644 (file)
@@ -26,7 +26,7 @@
 #define _CONFIGLOG_H_
 
 #include "UnicodeString.h"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 class UniStdioFile;
 
@@ -65,7 +65,7 @@ private:
        // Implementation data
 private:
        String m_sFileName;
-       boost::scoped_ptr<UniStdioFile> m_pfile;
+       std::unique_ptr<UniStdioFile> m_pfile;
 };
 
 #endif /* _CONFIGLOG_H_ */
\ No newline at end of file
index fdb3585..0d9774c 100644 (file)
@@ -55,18 +55,18 @@ using Poco::FastMutex;
  * @param [in] compareMethod Main compare method for this compare.
  */
 CDiffContext::CDiffContext(const PathContext & paths, int compareMethod)
-: m_piFilterGlobal(NULL)
-, m_piPluginInfos(NULL)
+: m_piFilterGlobal(nullptr)
+, m_piPluginInfos(nullptr)
 , m_nCompMethod(compareMethod)
 , m_bIgnoreSmallTimeDiff(false)
-, m_pCompareStats(NULL)
-, m_piAbortable(NULL)
+, m_pCompareStats(nullptr)
+, m_piAbortable(nullptr)
 , m_bStopAfterFirstDiff(false)
-, m_pFilterList(NULL)
-, m_pDiffWrapper(NULL)
-, m_pContentCompareOptions(NULL)
-, m_pQuickCompareOptions(NULL)
-, m_pOptions(NULL)
+, m_pFilterList(nullptr)
+, m_pDiffWrapper(nullptr)
+, m_pContentCompareOptions(nullptr)
+, m_pQuickCompareOptions(nullptr)
+, m_pOptions(nullptr)
 , m_bPluginsEnabled(false)
 , m_bRecursive(false)
 , m_bWalkUniques(true)
index ed88767..fb368f8 100644 (file)
@@ -12,7 +12,7 @@
 #define POCO_NO_UNWINDOWS 1
 #include <Poco/Mutex.h>
 #include <Poco/ThreadLocal.h>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "PathContext.h"
 #include "DiffFileInfo.h"
 #include "DiffItemList.h"
@@ -184,7 +184,7 @@ public:
 
        bool m_bRecursive; /**< Do we include subfolders to compare? */
        bool m_bPluginsEnabled; /**< Are plugins enabled? */
-       boost::scoped_ptr<FilterList> m_pFilterList; /**< Filter list for line filters */
+       std::unique_ptr<FilterList> m_pFilterList; /**< Filter list for line filters */
        CDiffWrapper *m_pDiffWrapper;
 
 private:
@@ -196,9 +196,9 @@ private:
         */
        int m_nCompMethod;
 
-       boost::scoped_ptr<DIFFOPTIONS> m_pOptions; /**< Generalized compare options. */
-       boost::scoped_ptr<CompareOptions> m_pContentCompareOptions; /**< Per compare method compare options. */
-       boost::scoped_ptr<CompareOptions> m_pQuickCompareOptions;   /**< Per compare method compare options. */
+       std::unique_ptr<DIFFOPTIONS> m_pOptions; /**< Generalized compare options. */
+       std::unique_ptr<CompareOptions> m_pContentCompareOptions; /**< Per compare method compare options. */
+       std::unique_ptr<CompareOptions> m_pQuickCompareOptions;   /**< Per compare method compare options. */
        PathContext m_paths; /**< (root) paths for this context */
        IAbortable *m_piAbortable; /**< Interface for aborting the compare. */
        Poco::FastMutex m_mutex;
index d5ebe76..4a4d087 100644 (file)
@@ -16,7 +16,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #endif
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "DiffItem.h"
 #include "FileLocation.h"
 #include "diff.h"
index cf10da6..efed9c4 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef _DIFFTHREAD_H
 #define _DIFFTHREAD_H
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include <Poco/Thread.h>
 #include <Poco/BasicEvent.h>
 #include <Poco/Delegate.h>
@@ -111,8 +111,8 @@ public:
 private:
        CDiffContext * m_pDiffContext; /**< Compare context storing results. */
        Poco::Thread m_threads[2]; /**< Compare threads. */
-       boost::scoped_ptr<DiffFuncStruct> m_pDiffParm; /**< Structure for sending data to threads. */
-       boost::scoped_ptr<DiffThreadAbortable> m_pAbortgate;
+       std::unique_ptr<DiffFuncStruct> m_pDiffParm; /**< Structure for sending data to threads. */
+       std::unique_ptr<DiffThreadAbortable> m_pAbortgate;
        bool m_bAborting; /**< Is compare aborting? */
        bool m_bOnlyRequested; /**< Are we comparing only requested items (Update?) */
 };
index b684bd8..61878ae 100644 (file)
@@ -83,10 +83,10 @@ CDiffWrapper::CDiffWrapper()
 , m_bAppendFiles(false)
 , m_nDiffs(0)
 , m_codepage(GetACP())
-, m_infoPrediffer(NULL)
-, m_pDiffList(NULL)
+, m_infoPrediffer(nullptr)
+, m_pDiffList(nullptr)
 , m_bPathsAreTemp(false)
-, m_pFilterList(NULL)
+, m_pFilterList(nullptr)
 , m_bPluginsEnabled(false)
 {
        memset(&m_status, 0, sizeof(DIFFSTATUS));
index 4acd2e5..ea5d9a7 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef _DIFFWRAPPER_H
 #define _DIFFWRAPPER_H
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "diff.h"
 #include "FileLocation.h"
 #include "PathContext.h"
@@ -210,7 +210,7 @@ public:
 private:
        DiffutilsOptions m_options;
        DIFFSTATUS m_status; /**< Status of last compare */
-       boost::scoped_ptr<FilterList> m_pFilterList; /**< List of linefilters. */
+       std::unique_ptr<FilterList> m_pFilterList; /**< List of linefilters. */
        PathContext m_files; /**< Full path to diff'ed file. */
        PathContext m_alternativePaths; /**< file's alternative path (may be relative). */
        PathContext m_originalFile; /**< file's original (NON-TEMP) path. */
@@ -218,7 +218,7 @@ private:
        String m_sPatchFile; /**< Full path to created patch file. */
        bool m_bPathsAreTemp; /**< Are compared paths temporary? */
        /// prediffer info are stored only for MergeDoc
-       boost::scoped_ptr<PrediffingInfo> m_infoPrediffer;
+       std::unique_ptr<PrediffingInfo> m_infoPrediffer;
        /// prediffer info are stored only for MergeDoc
        String m_sToFindPrediffer;
        bool m_bUseDiffList; /**< Are results returned in difflist? */
@@ -228,8 +228,8 @@ private:
        int m_nDiffs; /**< Difference count */
        int m_codepage; /**< Codepage used in line filter */
        DiffList *m_pDiffList; /**< Pointer to external DiffList */
-       boost::scoped_ptr<MovedLines> m_pMovedLines[3];
-       boost::scoped_ptr<FilterCommentsManager> m_FilterCommentsManager; /**< Comments filtering manager */
+       std::unique_ptr<MovedLines> m_pMovedLines[3];
+       std::unique_ptr<FilterCommentsManager> m_FilterCommentsManager; /**< Comments filtering manager */
        bool m_bPluginsEnabled; /**< Are plugins enabled? */
 };
 
index 4bf2d70..b7d44e0 100644 (file)
@@ -72,14 +72,14 @@ IMPLEMENT_DYNCREATE(CDirDoc, CDocument)
  * @brief Constructor.
  */
 CDirDoc::CDirDoc()
-: m_pCtxt(NULL)
-, m_pDirView(NULL)
-, m_pCompareStats(NULL)
+: m_pCtxt(nullptr)
+, m_pDirView(nullptr)
+, m_pCompareStats(nullptr)
 , m_bRecursive(FALSE)
-, m_statusCursor(NULL)
+, m_statusCursor(nullptr)
 , m_bReuseCloses(FALSE)
 , m_bMarkedRescan(FALSE)
-, m_pTempPathContext(NULL)
+, m_pTempPathContext(nullptr)
 {
        m_nDirs = m_nDirsTemp;
 
index 019b407..414a620 100644 (file)
@@ -30,7 +30,7 @@
 #define AFX_DIRDOC_H__0B17B4C1_356F_11D1_95CD_444553540000__INCLUDED_
 #pragma once
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "DiffThread.h"
 #include "PluginManager.h"
 
@@ -161,13 +161,13 @@ protected:
 
        // Implementation data
 private:
-       boost::scoped_ptr<CDiffContext> m_pCtxt; /**< Pointer to diff-data */
+       std::unique_ptr<CDiffContext> m_pCtxt; /**< Pointer to diff-data */
        CDirView *m_pDirView; /**< Pointer to GUI */
-       boost::scoped_ptr<CompareStats> m_pCompareStats; /**< Compare statistics */
+       std::unique_ptr<CompareStats> m_pCompareStats; /**< Compare statistics */
        MergeDocPtrList m_MergeDocs; /**< List of file compares opened from this compare */
        bool m_bRO[3]; /**< Is left/middle/right side read-only */
        bool m_bRecursive; /**< Is current compare recursive? */
-       boost::scoped_ptr<CustomStatusCursor> m_statusCursor;
+       std::unique_ptr<CustomStatusCursor> m_statusCursor;
        String m_strDesc[3]; /**< Left/middle/right side desription text */
        PluginManager m_pluginman;
        bool m_bReuseCloses; /**< Are we closing because of reuse? */
index 5305a0a..596773f 100644 (file)
@@ -30,7 +30,7 @@
 #include "paths.h"
 #include "TFile.h"
 
-using boost::shared_ptr;
+using std::shared_ptr;
 
 /**
        * @brief Convert file flags to string presentation.
index 3ac794f..7757a67 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "DirScan.h"
 #include <cassert>
+#include <memory>
 #define POCO_NO_UNWINDOWS 1
 #include <Poco/Semaphore.h>
 #include <Poco/Notification.h>
@@ -20,7 +21,6 @@
 #include <Poco/AutoPtr.h>
 #include <Poco/Stopwatch.h>
 #include <Poco/Format.h>
-#include <boost/shared_ptr.hpp>
 #include "DiffThread.h"
 #include "UnicodeString.h"
 #include "DiffWrapper.h"
@@ -107,7 +107,7 @@ private:
        CDiffContext *m_pCtxt;
 };
 
-typedef boost::shared_ptr<DiffWorker> DiffWorkerPtr;
+typedef std::shared_ptr<DiffWorker> DiffWorkerPtr;
 
 /**
  * @brief Collect file- and folder-names to list.
index 094d50d..2f0b71d 100644 (file)
@@ -135,20 +135,20 @@ IMPLEMENT_DYNCREATE(CDirView, CListView)
 CDirView::CDirView()
                : m_numcols(-1)
                , m_dispcols(-1)
-               , m_pList(NULL)
+               , m_pList(nullptr)
                , m_nHiddenItems(0)
                , m_bNeedSearchFirstDiffItem(true)
                , m_bNeedSearchLastDiffItem(true)
                , m_firstDiffItem(-1)
                , m_lastDiffItem(-1)
-               , m_pCmpProgressBar(NULL)
+               , m_pCmpProgressBar(nullptr)
                , m_compareStart(0)
                , m_bTreeMode(false)
-               , m_pShellContextMenuLeft(NULL)
-               , m_pShellContextMenuMiddle(NULL)
-               , m_pShellContextMenuRight(NULL)
-               , m_hCurrentMenu(NULL)
-               , m_pSavedTreeState(NULL)
+               , m_pShellContextMenuLeft(nullptr)
+               , m_pShellContextMenuMiddle(nullptr)
+               , m_pShellContextMenuRight(nullptr)
+               , m_hCurrentMenu(nullptr)
+               , m_pSavedTreeState(nullptr)
 {
        m_dwDefaultStyle &= ~LVS_TYPEMASK;
        // Show selection all the time, so user can see current item even when
index 052d786..75077ab 100644 (file)
@@ -33,7 +33,7 @@
 // CDirView view
 #include <afxcview.h>
 #include <map>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #define POCO_NO_UNWINDOWS 1
 #include <Poco/Types.h>
 #include "OptionsDiffColors.h"
@@ -289,7 +289,7 @@ protected:
        CFont m_font; /**< User-selected font */
        UINT m_nHiddenItems; /**< Count of items we have hidden */
        bool m_bTreeMode; /**< TRUE if tree mode is on*/
-       boost::scoped_ptr<DirCompProgressBar> m_pCmpProgressBar;
+       std::unique_ptr<DirCompProgressBar> m_pCmpProgressBar;
        clock_t m_compareStart; /**< Starting process time of the compare */
        bool m_bUserCancelEdit; /**< TRUE if the user cancels rename */
        String m_lastCopyFolder; /**< Last Copy To -target folder. */
@@ -300,11 +300,11 @@ protected:
        bool m_bNeedSearchLastDiffItem;
        COLORSETTINGS m_cachedColors; /**< Cached color settings */
 
-       boost::scoped_ptr<CShellContextMenu> m_pShellContextMenuLeft; /**< Shell context menu for group of left files */
-       boost::scoped_ptr<CShellContextMenu> m_pShellContextMenuMiddle; /**< Shell context menu for group of middle files */
-       boost::scoped_ptr<CShellContextMenu> m_pShellContextMenuRight; /**< Shell context menu for group of right files */
+       std::unique_ptr<CShellContextMenu> m_pShellContextMenuLeft; /**< Shell context menu for group of left files */
+       std::unique_ptr<CShellContextMenu> m_pShellContextMenuMiddle; /**< Shell context menu for group of middle files */
+       std::unique_ptr<CShellContextMenu> m_pShellContextMenuRight; /**< Shell context menu for group of right files */
        HMENU m_hCurrentMenu; /**< Current shell context menu (either left or right) */
-       boost::scoped_ptr<DirViewTreeState> m_pSavedTreeState;
+       std::unique_ptr<DirViewTreeState> m_pSavedTreeState;
 
        // Generated message map functions
        afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
index 6c780fd..3a5719e 100644 (file)
@@ -45,7 +45,7 @@ END_MESSAGE_MAP()
  * @brief Constructor.
  */
 CEditorFilePathBar::CEditorFilePathBar()
-: m_pFont(NULL), m_nPanes(2)
+: m_pFont(nullptr), m_nPanes(2)
 {
 }
 
index f6e0f82..db50f5b 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef __EDITORFILEPATHBAR_H__
 #define __EDITORFILEPATHBAR_H__
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "FilepathEdit.h"
 
 /**
@@ -78,7 +78,7 @@ protected:
 private:
        // this dialog uses custom edit boxes
        CFilepathEdit m_Edit[3]; /**< Edit controls. */
-       boost::scoped_ptr<CFont> m_pFont; /**< Font for editcontrols */
+       std::unique_ptr<CFont> m_pFont; /**< Font for editcontrols */
        int m_nPanes;
 };
 
index aa431d6..e0f600f 100644 (file)
@@ -26,7 +26,7 @@
 #define _FILEACTIONSCRIPT_H_
 
 #include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 class ShellFileOperations;
 
@@ -153,11 +153,11 @@ protected:
 
 private:
        std::vector<FileActionItem> m_actions; /**< List of all actions for this script. */
-       boost::scoped_ptr<ShellFileOperations> m_pCopyOperations; /**< Copy operations. */
+       std::unique_ptr<ShellFileOperations> m_pCopyOperations; /**< Copy operations. */
        BOOL m_bHasCopyOperations; /**< flag if we've put anything into m_pCopyOperations */
-       boost::scoped_ptr<ShellFileOperations> m_pMoveOperations; /**< Move operations. */
+       std::unique_ptr<ShellFileOperations> m_pMoveOperations; /**< Move operations. */
        BOOL m_bHasMoveOperations; /**< flag if we've put anything into m_pMoveOperations */
-       boost::scoped_ptr<ShellFileOperations> m_pDelOperations; /**< Delete operations. */
+       std::unique_ptr<ShellFileOperations> m_pDelOperations; /**< Delete operations. */
        BOOL m_bHasDelOperations; /**< flag if we've put anything into m_pDelOperations */
        BOOL m_bUseRecycleBin; /**< Use recycle bin for script actions? */
        HWND m_hParentWindow; /**< Parent window for showing messages */
index 1319305..dfa2736 100644 (file)
@@ -25,9 +25,9 @@
 #define __FILEFILTER_H__
 
 #include <vector>
+#include <memory>
 #define POCO_NO_UNWINDOWS 1
 #include <Poco/RegularExpression.h>
-#include <boost/shared_ptr.hpp>
 #include "UnicodeString.h"
 
 /**
@@ -50,7 +50,7 @@ struct FileFilterElement
        }
 };
 
-typedef boost::shared_ptr<FileFilterElement> FileFilterElementPtr;
+typedef std::shared_ptr<FileFilterElement> FileFilterElementPtr;
 
 /**
  * @brief One actual filter.
@@ -75,6 +75,6 @@ struct FileFilter
        static void EmptyFilterList(std::vector<FileFilterElementPtr> *filterList);
 };
 
-typedef boost::shared_ptr<FileFilter> FileFilterPtr;
+typedef std::shared_ptr<FileFilter> FileFilterPtr;
 
 #endif
index cd801ce..4b73b3c 100644 (file)
@@ -37,7 +37,7 @@ using std::vector;
  * @brief Constructor, creates new filtermanager.
  */
 FileFilterHelper::FileFilterHelper()
-: m_pMaskFilter(NULL)
+: m_pMaskFilter(nullptr)
 , m_bUseMask(true)
 , m_fileFilterMgr(new FileFilterMgr)
 {
index 70fd958..f9b60d0 100644 (file)
@@ -26,7 +26,7 @@
 #define _FILEFILTERHELPER_H_
 
 #include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "UnicodeString.h"
 #include "DirItem.h"
 
@@ -154,9 +154,9 @@ protected:
        String ParseExtensions(const String &extensions) const;
 
 private:
-       boost::scoped_ptr<FilterList> m_pMaskFilter;       /*< Filter for filemasks (*.cpp) */
+       std::unique_ptr<FilterList> m_pMaskFilter;       /*< Filter for filemasks (*.cpp) */
        FileFilter * m_currentFilter;     /*< Currently selected filefilter */
-       boost::scoped_ptr<FileFilterMgr> m_fileFilterMgr;  /*< Associated FileFilterMgr */
+       std::unique_ptr<FileFilterMgr> m_fileFilterMgr;  /*< Associated FileFilterMgr */
        String m_sFileFilterPath;        /*< Path to current filter */
        String m_sMask;   /*< File mask (if defined) "*.cpp *.h" etc */
        bool m_bUseMask;   /*< If TRUE file mask is used, filter otherwise */
index 56f24cc..f91fa2a 100644 (file)
@@ -11,9 +11,9 @@
 
 #include <vector>
 #include <string>
+#include <memory>
 #define POCO_NO_UNWINDOWS 1
 #include <Poco/RegularExpression.h>
-#include <boost/shared_ptr.hpp>
 #include "codepage.h"
 
 /**
@@ -29,7 +29,7 @@ struct filter_item
        filter_item(const std::string &filter, int reOpts) : filterAsString(filter), regexp(filter, reOpts) {}
 };
 
-typedef boost::shared_ptr<filter_item> filter_item_ptr;
+typedef std::shared_ptr<filter_item> filter_item_ptr;
 
 /**
  * @brief Regular expression list.
index ef03293..e73a4fa 100644 (file)
@@ -30,9 +30,9 @@ using CompareEngines::TimeSizeCompare;
 static void GetComparePaths(CDiffContext * pCtxt, const DIFFITEM &di, PathContext & files);
 
 FolderCmp::FolderCmp()
-: m_pDiffUtilsEngine(NULL)
-, m_pByteCompare(NULL)
-, m_pTimeSizeCompare(NULL)
+: m_pDiffUtilsEngine(nullptr)
+, m_pByteCompare(nullptr)
+, m_pTimeSizeCompare(nullptr)
 , m_ndiffs(CDiffContext::DIFFS_UNKNOWN)
 , m_ntrivialdiffs(CDiffContext::DIFFS_UNKNOWN)
 {
index 4559ebd..1e15718 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef _FOLDERCMP_H_
 #define _FOLDERCMP_H_
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "DiffFileData.h"
 #include "DiffUtils.h"
 #include "ByteCompare.h"
@@ -53,9 +53,9 @@ public:
        DiffFileData m_diffFileData;
 
 private:
-       boost::scoped_ptr<CompareEngines::DiffUtils> m_pDiffUtilsEngine;
-       boost::scoped_ptr<CompareEngines::ByteCompare> m_pByteCompare;
-       boost::scoped_ptr<CompareEngines::TimeSizeCompare> m_pTimeSizeCompare;
+       std::unique_ptr<CompareEngines::DiffUtils> m_pDiffUtilsEngine;
+       std::unique_ptr<CompareEngines::ByteCompare> m_pByteCompare;
+       std::unique_ptr<CompareEngines::TimeSizeCompare> m_pTimeSizeCompare;
 };
 
 
index 5378920..c4894b4 100644 (file)
@@ -10,7 +10,7 @@
 #define _LINEFILTERS_LIST_H_
 
 #include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include "UnicodeString.h"
 
 class COptionsMgr;
@@ -25,7 +25,7 @@ struct LineFilterItem
        LineFilterItem() : enabled(false) { }
 };
 
-typedef boost::shared_ptr<LineFilterItem> LineFilterItemPtr;
+typedef std::shared_ptr<LineFilterItem> LineFilterItemPtr;
 
 /**
  @brief List of line filters.
index e4f604e..d5e9129 100644 (file)
@@ -89,8 +89,8 @@ CLocationView::CLocationView()
        : m_visibleTop(-1)
        , m_visibleBottom(-1)
 //     MOVEDLINE_LIST m_movedLines; //*< List of moved block connecting lines */
-       , m_hwndFrame(NULL)
-       , m_pSavedBackgroundBitmap(NULL)
+       , m_hwndFrame(nullptr)
+       , m_pSavedBackgroundBitmap(nullptr)
        , m_bDrawn(false)
        , m_bRecalculateBlocks(TRUE) // calculate for the first time
 {
@@ -979,8 +979,8 @@ void CLocationView::DrawVisibleAreaRect(CDC *pClientDC, int nTopLine, int nBotto
        m_visibleBottom = nBottomCoord;
 
        CRect rcVisibleArea(2, m_visibleTop, rc.right - 2, m_visibleBottom);
-       boost::scoped_ptr<CBitmap> pBitmap(CopyRectToBitmap(pClientDC, rcVisibleArea));
-       boost::scoped_ptr<CBitmap> pDarkenedBitmap(GetDarkenedBitmap(pClientDC, pBitmap.get()));
+       std::unique_ptr<CBitmap> pBitmap(CopyRectToBitmap(pClientDC, rcVisibleArea));
+       std::unique_ptr<CBitmap> pDarkenedBitmap(GetDarkenedBitmap(pClientDC, pBitmap.get()));
        DrawBitmap(pClientDC, rcVisibleArea.left, rcVisibleArea.top, pDarkenedBitmap.get());
 }
 
index a28e2fb..de8fea0 100644 (file)
@@ -14,7 +14,7 @@
 #define __LOCATIONVIEW_H__
 
 #include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 class CMergeDoc;
 class CMergeEditView;
@@ -113,7 +113,7 @@ private:
        int m_nSubLineCount[3]; //*< Cached subline count */
        MOVEDLINE_LIST m_movedLines; //*< List of moved block connecting lines */
        HWND m_hwndFrame; //*< Frame window handle */
-       boost::scoped_ptr<CBitmap> m_pSavedBackgroundBitmap; //*< Saved background */
+       std::unique_ptr<CBitmap> m_pSavedBackgroundBitmap; //*< Saved background */
        bool m_bDrawn; //*< Is already drawn in location pane? */
        std::vector<DiffBlock> m_diffBlocks; //*< List of pre-calculated diff blocks.
        BOOL m_bRecalculateBlocks; //*< Recalculate diff blocks in next repaint.
index 4f17d47..3471778 100644 (file)
@@ -2031,7 +2031,7 @@ void CMainFrame::OnToolsFilters()
        LineFiltersDlg lineFiltersDlg;
        FileFiltersDlg fileFiltersDlg;
        vector<FileFilterInfo> fileFilters;
-       boost::scoped_ptr<LineFiltersList> lineFilters(new LineFiltersList());
+       std::unique_ptr<LineFiltersList> lineFilters(new LineFiltersList());
        String selectedFilter;
        const String origFilter = theApp.m_pGlobalFileFilter->GetFilterNameOrMask();
        sht.AddPage(&fileFiltersDlg);
index 3abc33b..f0944e7 100644 (file)
@@ -30,8 +30,7 @@
 #define AFX_MAINFRM_H__BBCD4F8C_34E4_11D1_BAA6_00A024706EDC__INCLUDED_
 
 #include <vector>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include "ToolBarXPThemes.h"
 #include "MDITabBar.h"
 #include "PathContext.h"
@@ -49,7 +48,7 @@ class LineFiltersList;
 class TempFile;
 struct FileLocation;
 
-typedef boost::shared_ptr<TempFile> TempFilePtr;
+typedef std::shared_ptr<TempFile> TempFilePtr;
 
 // typed lists (homogenous pointer lists)
 typedef CTypedPtrList<CPtrList, COpenDoc *> OpenDocList;
@@ -205,7 +204,7 @@ protected:
 
        static const MENUITEM_ICON m_MenuIcons[];
 
-       boost::scoped_ptr<BCMenu> m_pMenus[MENU_COUNT]; /**< Menus for different views */
+       std::unique_ptr<BCMenu> m_pMenus[MENU_COUNT]; /**< Menus for different views */
        std::vector<TempFilePtr> m_tempFiles; /**< List of possibly needed temp files. */
 
 // Generated message map functions
index 4d90d44..c8cb61a 100644 (file)
@@ -33,7 +33,7 @@
        #error include 'stdafx.h' before including this file for PCH
 #endif
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "MergeCmdLineInfo.h"
 #include "resource.h"       // main symbols
 
@@ -78,16 +78,16 @@ public:
        CMultiDocTemplate* m_pDiffTemplate;
        CMultiDocTemplate* m_pHexMergeTemplate;
        CMultiDocTemplate* m_pDirTemplate;
-       boost::scoped_ptr<CLanguageSelect> m_pLangDlg;
-       boost::scoped_ptr<FileFilterHelper> m_pGlobalFileFilter;
-       boost::scoped_ptr<SyntaxColors> m_pSyntaxColors; /**< Syntax color container */
-       boost::scoped_ptr<VSSHelper> m_pVssHelper; /**< Helper class for VSS integration */
+       std::unique_ptr<CLanguageSelect> m_pLangDlg;
+       std::unique_ptr<FileFilterHelper> m_pGlobalFileFilter;
+       std::unique_ptr<SyntaxColors> m_pSyntaxColors; /**< Syntax color container */
+       std::unique_ptr<VSSHelper> m_pVssHelper; /**< Helper class for VSS integration */
        CString m_strSaveAsPath; /**< "3rd path" where output saved if given */
        BOOL m_bEscShutdown; /**< If commandline switch -e given ESC closes appliction */
        SyntaxColors * GetMainSyntaxColors() { return m_pSyntaxColors.get(); }
        BOOL m_bClearCaseTool; /**< WinMerge is executed as an external Rational ClearCase compare/merge tool. */
        MergeCmdLineInfo::ExitNoDiff m_bExitIfNoDiff; /**< Exit if files are identical? */
-       boost::scoped_ptr<LineFiltersList> m_pLineFilters; /**< List of linefilters */
+       std::unique_ptr<LineFiltersList> m_pLineFilters; /**< List of linefilters */
 
        /**
         * @name Version Control System (VCS) integration.
@@ -218,7 +218,7 @@ protected:
        //}}AFX_MSG
        DECLARE_MESSAGE_MAP()
 private:
-       boost::scoped_ptr<COptionsMgr> m_pOptions;
+       std::unique_ptr<COptionsMgr> m_pOptions;
        CAssureScriptsForThread * m_mainThreadScripts;
        int m_nLastCompareResult;
        bool m_bNonInteractive;
index f3d484d..d5b555e 100644 (file)
@@ -31,7 +31,7 @@
 #include "DiffTextBuffer.h"
 #include <vector>
 #include <map>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "DiffWrapper.h"
 #include "DiffList.h"
 #include "TempFile.h"
@@ -176,7 +176,7 @@ public:
 
 // Begin declaration of CMergeDoc
 
-       boost::scoped_ptr<CDiffTextBuffer> m_ptBuf[3]; /**< Left/Middle/Right side text buffer */
+       std::unique_ptr<CDiffTextBuffer> m_ptBuf[3]; /**< Left/Middle/Right side text buffer */
        int m_nBuffers;
 
 protected: // create from serialization only
@@ -185,8 +185,8 @@ protected: // create from serialization only
 
        // Operations
 public:        
-       boost::scoped_ptr<DiffFileInfo> m_pSaveFileInfo[3];
-       boost::scoped_ptr<DiffFileInfo> m_pRescanFileInfo[3];
+       std::unique_ptr<DiffFileInfo> m_pSaveFileInfo[3];
+       std::unique_ptr<DiffFileInfo> m_pRescanFileInfo[3];
        DiffList m_diffList;
        UINT m_nTrivialDiffs; /**< Amount of trivial (ignored) diffs */
        PathContext m_filePaths; /**< Filepaths for this document */
@@ -319,7 +319,7 @@ protected:
        COleDateTime m_LastRescan; /**< Time of last rescan (for delaying) */ 
        CDiffWrapper m_diffWrapper;
        /// information about the file packer/unpacker
-       boost::scoped_ptr<PackingInfo> m_pInfoUnpacker;
+       std::unique_ptr<PackingInfo> m_pInfoUnpacker;
        String m_strDesc[3]; /**< Left/Middle/Right side description text */
        BUFFERTYPE m_nBufferType[3];
        bool m_bEditAfterRescan[3]; /**< Left/middle/right doc edited after rescanning */
index e4ff845..eecdd1c 100644 (file)
@@ -10,7 +10,7 @@
 #include "StdAfx.h"
 #include "MergeDoc.h"
 #include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "Merge.h"
 #include "MergeEditView.h"
 #include "DiffTextBuffer.h"
@@ -168,7 +168,7 @@ void CMergeDoc::GetWordDiffArray(int nLineIndex, vector<WordDiff> *pWordDiffs)
        DIFFOPTIONS diffOptions = {0};
        m_diffWrapper.GetOptions(&diffOptions);
        String str[3];
-       boost::scoped_array<int> nOffsets[3];
+       std::unique_ptr<int[]> nOffsets[3];
        const int LineLimit = 20;
        bool diffPerLine = false;
        
index 38ec64c..5b19317 100644 (file)
@@ -3,7 +3,7 @@
 
 #define POCO_NO_UNWINDOWS 1
 #include <Poco/Mutex.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <map>
 // defines IPluginInfos
 #include "DiffContext.h"
@@ -19,7 +19,7 @@ struct PluginFileInfo
        PrediffingInfo m_infoPrediffer;
 };
 
-typedef boost::shared_ptr<PluginFileInfo> PluginFileInfoPtr;
+typedef std::shared_ptr<PluginFileInfo> PluginFileInfoPtr;
 
 /**
  * @brief Cache of known plugin infos
index 8bac9b0..b7c794a 100644 (file)
 #include <vector>
 #include <windows.h>
 #include <oleauto.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include "UnicodeString.h"
 
 struct FileFilterElement;
-typedef boost::shared_ptr<FileFilterElement> FileFilterElementPtr;
+typedef std::shared_ptr<FileFilterElement> FileFilterElementPtr;
 
 /**
  * @brief List of transformation categories (events)
@@ -91,10 +91,10 @@ private:
        PluginInfo& operator=( const PluginInfo& ); // non copyable
 };
 
-typedef boost::shared_ptr<PluginInfo> PluginInfoPtr;
+typedef std::shared_ptr<PluginInfo> PluginInfoPtr;
 
 typedef std::vector<PluginInfoPtr> PluginArray;
-typedef boost::shared_ptr<PluginArray> PluginArrayPtr;
+typedef std::shared_ptr<PluginArray> PluginArrayPtr;
 
 /**
  * @brief Cache for the scriptlets' interfaces during the life of a thread. 
index 282e76a..2aea17c 100644 (file)
@@ -30,7 +30,7 @@
 #define AFX_SELECTUNPACKERDLG_H__C8FD4C3A_5ED5_43D3_ADAE_A2378369705C__INCLUDED_
 
 #include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 
 /////////////////////////////////////////////////////////////////////////////
 // CSelectUnpackerDlgDlg dialog
@@ -78,9 +78,9 @@ protected:
        std::vector<bool> m_bWithFileFlags;
 
        // const data "no plugin"
-       boost::scoped_ptr<PluginInfo> noPlugin;
+       std::unique_ptr<PluginInfo> noPlugin;
        // const data "automatic plugin"
-       boost::scoped_ptr<PluginInfo> automaticPlugin;
+       std::unique_ptr<PluginInfo> automaticPlugin;
 
        // input value
        CString m_filteredFilenames;
index 639b62c..eec9694 100644 (file)
@@ -16,10 +16,10 @@ static void CollapseWhitespace(String &line);
  * @brief Constructor.
  */
 UniMarkdownFile::UniMarkdownFile()
-: m_pMarkdown(NULL)
+: m_pMarkdown(nullptr)
 , m_depth(0)
 , m_bMove(false)
-, m_transparent(NULL)
+, m_transparent(nullptr)
 {
 }
 
index fabd73d..d09c58a 100644 (file)
@@ -6,7 +6,7 @@
 // ID line follows -- this is updated by SVN
 // $Id$
 
-#include <boost/scoped_ptr.hpp>
+#include <memory>
 #include "Common/UniFile.h"
 
 class CMarkdown;
@@ -31,5 +31,5 @@ private:
        int m_depth;
        bool m_bMove;
        unsigned char *m_transparent;
-       boost::scoped_ptr<CMarkdown> m_pMarkdown;
+       std::unique_ptr<CMarkdown> m_pMarkdown;
 };
index 66a2f62..cf7686f 100644 (file)
@@ -12,7 +12,7 @@
 #include <cstring>
 #include <algorithm>
 #include <windows.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
 #include "unicoder.h"
 #include "ExConverter.h"
 #include "codepage.h"
@@ -130,7 +130,7 @@ static unsigned demoGuessEncoding_html(const char *src, size_t len, int defcodep
 static unsigned demoGuessEncoding_xml(const char *src, size_t len, int defcodepage)
 {
        const char *psrc = src;
-       boost::scoped_array<char> buf;
+       std::unique_ptr<char[]> buf;
        if (len >= 2 && (src[0] == 0 || src[1] == 0))
        {
                buf.reset(new char[len]);