#include "StdAfx.h"
#include "Bitmap.h"
#include <cmath>
-#include <boost/scoped_array.hpp>
+#include <memory>
#ifdef _DEBUG
#define new DEBUG_NEW
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;
#include "DragDrop.h"
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "paths.h"
//
// 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);
#include "ExConverter.h"
#include <windows.h>
#include <mlang.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "unicoder.h"
#include "codepage.h"
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)
{
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);
#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()
// 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;
#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>
try
{
{
- boost::scoped_ptr<SharedMemory> pshmIn;
+ std::unique_ptr<SharedMemory> pshmIn;
// Get source data
if (m_bCurrentIsFile)
{
try
{
{
- boost::scoped_ptr<SharedMemory> pshmIn;
+ std::unique_ptr<SharedMemory> pshmIn;
// Get source data
if (m_bCurrentIsFile)
{
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();
try
{
{
- boost::scoped_ptr<SharedMemory> pshmIn;
+ std::unique_ptr<SharedMemory> pshmIn;
// Get source data
if (m_bCurrentIsFile)
{
try
{
{
- boost::scoped_ptr<SharedMemory> pshmIn;
+ std::unique_ptr<SharedMemory> pshmIn;
// Get source data
if (m_bCurrentIsFile)
{
#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"
// 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)
{
#define VERSIONTOOLS_H
#include <shlwapi.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "UnicodeString.h"
/**
{
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) */
* @brief Default constructor.
*/
ByteCompare::ByteCompare()
- : m_pOptions(NULL)
- , m_piAbortable(NULL)
- , m_inf(NULL)
+ : m_pOptions(nullptr)
+ , m_piAbortable(nullptr)
+ , m_inf(nullptr)
{
}
#ifndef _BYTE_COMPARE_H_
#define _BYTE_COMPARE_H_
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "FileTextStats.h"
class CompareOptions;
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];
* @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)
#ifndef _DIFF_UTILS_H_
#define _DIFF_UTILS_H_
-#include <boost/scoped_ptr.hpp>
+#include <memory>
class CompareOptions;
class FilterList;
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;
};
#include <cassert>
#include <windows.h>
#include <mbctype.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "Constants.h"
#include "version.h"
#include "UniFile.h"
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))
#define _CONFIGLOG_H_
#include "UnicodeString.h"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
class UniStdioFile;
// 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
* @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)
#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"
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:
*/
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;
#include <sys/types.h>
#include <unistd.h>
#endif
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "DiffItem.h"
#include "FileLocation.h"
#include "diff.h"
#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>
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?) */
};
, 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));
#ifndef _DIFFWRAPPER_H
#define _DIFFWRAPPER_H
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "diff.h"
#include "FileLocation.h"
#include "PathContext.h"
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. */
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? */
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? */
};
* @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;
#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"
// 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? */
#include "paths.h"
#include "TFile.h"
-using boost::shared_ptr;
+using std::shared_ptr;
/**
* @brief Convert file flags to string presentation.
#include "DirScan.h"
#include <cassert>
+#include <memory>
#define POCO_NO_UNWINDOWS 1
#include <Poco/Semaphore.h>
#include <Poco/Notification.h>
#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"
CDiffContext *m_pCtxt;
};
-typedef boost::shared_ptr<DiffWorker> DiffWorkerPtr;
+typedef std::shared_ptr<DiffWorker> DiffWorkerPtr;
/**
* @brief Collect file- and folder-names to list.
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
// 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"
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. */
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);
* @brief Constructor.
*/
CEditorFilePathBar::CEditorFilePathBar()
-: m_pFont(NULL), m_nPanes(2)
+: m_pFont(nullptr), m_nPanes(2)
{
}
#ifndef __EDITORFILEPATHBAR_H__
#define __EDITORFILEPATHBAR_H__
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "FilepathEdit.h"
/**
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;
};
#define _FILEACTIONSCRIPT_H_
#include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
class ShellFileOperations;
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 */
#define __FILEFILTER_H__
#include <vector>
+#include <memory>
#define POCO_NO_UNWINDOWS 1
#include <Poco/RegularExpression.h>
-#include <boost/shared_ptr.hpp>
#include "UnicodeString.h"
/**
}
};
-typedef boost::shared_ptr<FileFilterElement> FileFilterElementPtr;
+typedef std::shared_ptr<FileFilterElement> FileFilterElementPtr;
/**
* @brief One actual filter.
static void EmptyFilterList(std::vector<FileFilterElementPtr> *filterList);
};
-typedef boost::shared_ptr<FileFilter> FileFilterPtr;
+typedef std::shared_ptr<FileFilter> FileFilterPtr;
#endif
* @brief Constructor, creates new filtermanager.
*/
FileFilterHelper::FileFilterHelper()
-: m_pMaskFilter(NULL)
+: m_pMaskFilter(nullptr)
, m_bUseMask(true)
, m_fileFilterMgr(new FileFilterMgr)
{
#define _FILEFILTERHELPER_H_
#include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "UnicodeString.h"
#include "DirItem.h"
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 */
#include <vector>
#include <string>
+#include <memory>
#define POCO_NO_UNWINDOWS 1
#include <Poco/RegularExpression.h>
-#include <boost/shared_ptr.hpp>
#include "codepage.h"
/**
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.
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)
{
#ifndef _FOLDERCMP_H_
#define _FOLDERCMP_H_
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "DiffFileData.h"
#include "DiffUtils.h"
#include "ByteCompare.h"
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;
};
#define _LINEFILTERS_LIST_H_
#include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "UnicodeString.h"
class COptionsMgr;
LineFilterItem() : enabled(false) { }
};
-typedef boost::shared_ptr<LineFilterItem> LineFilterItemPtr;
+typedef std::shared_ptr<LineFilterItem> LineFilterItemPtr;
/**
@brief List of line filters.
: 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
{
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());
}
#define __LOCATIONVIEW_H__
#include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
class CMergeDoc;
class CMergeEditView;
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.
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);
#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"
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;
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
#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
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.
//}}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;
#include "DiffTextBuffer.h"
#include <vector>
#include <map>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "DiffWrapper.h"
#include "DiffList.h"
#include "TempFile.h"
// 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
// 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 */
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 */
#include "StdAfx.h"
#include "MergeDoc.h"
#include <vector>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "Merge.h"
#include "MergeEditView.h"
#include "DiffTextBuffer.h"
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;
#define POCO_NO_UNWINDOWS 1
#include <Poco/Mutex.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <map>
// defines IPluginInfos
#include "DiffContext.h"
PrediffingInfo m_infoPrediffer;
};
-typedef boost::shared_ptr<PluginFileInfo> PluginFileInfoPtr;
+typedef std::shared_ptr<PluginFileInfo> PluginFileInfoPtr;
/**
* @brief Cache of known plugin infos
#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)
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.
#define AFX_SELECTUNPACKERDLG_H__C8FD4C3A_5ED5_43D3_ADAE_A2378369705C__INCLUDED_
#include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
/////////////////////////////////////////////////////////////////////////////
// CSelectUnpackerDlgDlg dialog
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;
* @brief Constructor.
*/
UniMarkdownFile::UniMarkdownFile()
-: m_pMarkdown(NULL)
+: m_pMarkdown(nullptr)
, m_depth(0)
, m_bMove(false)
-, m_transparent(NULL)
+, m_transparent(nullptr)
{
}
// ID line follows -- this is updated by SVN
// $Id$
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "Common/UniFile.h"
class CMarkdown;
int m_depth;
bool m_bMove;
unsigned char *m_transparent;
- boost::scoped_ptr<CMarkdown> m_pMarkdown;
+ std::unique_ptr<CMarkdown> m_pMarkdown;
};
#include <cstring>
#include <algorithm>
#include <windows.h>
-#include <boost/scoped_array.hpp>
+#include <memory>
#include "unicoder.h"
#include "ExConverter.h"
#include "codepage.h"
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]);