Cppcheck: Variable * is assigned a value that is never used.
line.erase();
eol.erase();
const TCHAR * pchLine = (const TCHAR *)m_current;
- String localLine;
// shortcut methods in case file is in the same encoding as our Strings
break;
}
- // first pass : get the size of the destination file
- size_t nSizeBOM = (bWriteBOM) ? 3 : 0;
- size_t nDstSize = nBufSize * 2;
-
const size_t minbufsize = 128 * 1024;
// create the destination file
// Now convert to TCHAR (which means defcodepage)
flags = WC_NO_BEST_FIT_CHARS; // TODO: Think about this
- wlen = n;
BOOL defaulted = FALSE;
BOOL * pdefaulted = &defaulted;
if (cpout == CP_UTF8)
String eol, preveol;
String sline;
bool done = false;
+#ifdef _DEBUG
UINT next_line_report = 100; // for trace messages
UINT next_line_multiple = 5; // for trace messages
+#endif
COleDateTime start = COleDateTime::GetCurrentTime(); // for trace messages
// Manually grow line array exponentially
// diff_2_files set bin_flag to +1 if same binary
file_data * inf = diffdata.m_inf;
- file_data * inf10 = diffdata10.m_inf;
file_data * inf12 = diffdata12.m_inf;
file_data * inf02 = diffdata02.m_inf;
shellContextMenu->Initialize();
CDirDoc *pDoc = GetDocument();
- String parentDir; // use it to track that all selected files are in the same parent directory
int i = -1;
while ((i = m_pList->GetNextItem(i, LVNI_SELECTED)) != -1)
*/
void CDirView::OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult)
{
- NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
-
COleDataSource *DropData = new COleDataSource();
String filesForDroping;
bool bFileOpSucceed = true;
bool bUserCancelled = false;
BOOL bRetVal = TRUE;
- int apiRetVal = 0;
CreateOperationsScripts();
*/
void GetComparePaths(CDiffContext * pCtxt, const DIFFITEM &di, PathContext & files)
{
- static const TCHAR backslash[] = _T("\\");
int nDirs = pCtxt->GetCompareDirs();
files.SetSize(nDirs);
switch (Try(m_pView[1]->SaveFile(pathMiddle.c_str())))
{
case 0:
- bRSaveSuccess = TRUE;
+ bMSaveSuccess = TRUE;
break;
case IDCANCEL:
result = FALSE;
// If file were modified and saving was successfull,
// update status on dir view
- if (bLSaveSuccess || bRSaveSuccess)
+ if (bLSaveSuccess || bMSaveSuccess || bRSaveSuccess)
{
UpdateDiffItem(m_pDirDoc);
}
{
int max=0;
int maxKey=0;
- int key=0;
- int n=0;
std::map<int, int>::const_iterator pos = m_map.begin();
while (pos != m_map.end())
{
{
if (m_bDrawn)
{
- static int prevsublinecount[3] = {0};
CMergeDoc *pDoc = GetDocument();
int pane;
IF_IS_TRUE_ALL(m_nSubLineCount[pane] == m_view[pane]->GetSubLineCount(), pane, pDoc->m_nBuffers)
int limit = cd_dend;
// curView is the view which is changed, so the opposite of the source view
- CCrystalTextView* srcView = m_pView[srcPane];
- CCrystalTextView* dstView = m_pView[dstPane];
-
dbuf.BeginUndoGroup(bGroupWithPrevious);
if (cd_blank>=0)
{
BOOL COpenView::LoadProjectFile(const String &path)
{
String filterPrefix = theApp.LoadString(IDS_FILTER_PREFIX);
- String err;
ProjectFile prj;
if (!theApp.LoadProjectFile(path, prj))
String ext;
String path;
paths_SplitFilename(strSavePath, &path, NULL, &ext);
- String spath(path);
String strExt = string_makelower(ext);
if (strExt == _T("vcproj"))
bVCProj = true;
}
// Now fullPath holds our desired path
- String sLong;
TCHAR *ptr = fullPath;
TCHAR *end = NULL;
}
else
{
- std::vector<wdiff> diffs10, diffs12, diffs02;
+ std::vector<wdiff> diffs10, diffs12;
stringdiffs sdiffs10(str[1], str[0], case_sensitive, whitespace, breakType, &diffs10);
stringdiffs sdiffs12(str[1], str[2], case_sensitive, whitespace, breakType, &diffs12);
// Hash all words in both lines and then compare them word by word
// return false;
onp(edscript);
- const int iSize1 = (int)m_words1.size();
- const int iSize2 = (int)m_words2.size();
int i = 1, j = 1;
for (size_t k = 0; k < edscript.size(); k++)
{