Skip to content

Commit

Permalink
VS2010 compatibility changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
prekageo committed May 16, 2012
1 parent 1f7d905 commit d04b50e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/Explorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "SysMsg.h"
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <shellapi.h>
#include <shlwapi.h>
#include <shlobj.h>
Expand Down
3 changes: 2 additions & 1 deletion src/ExplorerDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,8 @@ void ExplorerDialog::GetFolderPathName(HTREEITEM currentItem, LPTSTR folderPathN
{
/* remove drive name */
_tcscpy(TEMP, folderPathName);
for (int i = 3; TEMP[i] != '\\'; i++);
int i;
for (i = 3; TEMP[i] != '\\'; i++);

_stprintf(folderPathName, _T("%c:%s"), TEMP[0], &TEMP[i]);
}
Expand Down
10 changes: 5 additions & 5 deletions src/FavesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ void FavesDialog::PasteItem(HTREEITEM hItem)

delete [] pElemCC->pszName;
delete [] pElemCC->pszLink;
pParentElem->vElements.erase(pElemCC);
pParentElem->vElements.erase(pParentElem->vElements.begin()+(pElemCC-&pParentElem->vElements[0]));

/* update information and delete element */
UpdateLink(hParentItem);
Expand Down Expand Up @@ -1170,7 +1170,7 @@ void FavesDialog::DeleteItem(HTREEITEM hItem)
{
/* delete child elements */
DeleteRecursive(pElem);
((PELEM)GetParam(hItemParent))->vElements.erase(pElem);
((PELEM)GetParam(hItemParent))->vElements.erase(((PELEM)GetParam(hItemParent))->vElements.begin()+(pElem-&((PELEM)GetParam(hItemParent))->vElements[0]));

/* update information and delete element */
TreeView_DeleteItem(_hTreeCtrl, hItem);
Expand Down Expand Up @@ -1801,7 +1801,7 @@ void FavesDialog::SortElementList(vector<tItemElement> & elementList)
{
*itr = groupList[i];
}
for (i = 0; i < sizeOfLink; i++, itr++)
for (int i = 0; i < sizeOfLink; i++, itr++)
{
*itr = linkList[i];
}
Expand Down Expand Up @@ -1933,7 +1933,7 @@ void FavesDialog::ReadSettings(void)
#endif

/* finaly, fill out the tree and the vDB */
for (i = 0; i < FAVES_ITEM_MAX; i++)
for (int i = 0; i < FAVES_ITEM_MAX; i++)
{
/* error */
if (ptr == NULL)
Expand All @@ -1958,7 +1958,7 @@ void FavesDialog::ReadSettings(void)
}

/* now read the information */
ReadElementTreeRecursive(&_vDB[i], &ptr);
ReadElementTreeRecursive(_vDB.begin()+i, &ptr);
}
#ifdef UNICODE
}
Expand Down
10 changes: 5 additions & 5 deletions src/FileList/FileList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ BOOL FileList::notify(WPARAM wParam, LPARAM lParam)
UpdateList();

/* mark old items */
for (i = 0; i < _uMaxElements; i++) {
for (int i = 0; i < _uMaxElements; i++) {
ListView_SetItemState(_hSelf, i, _vFileList[i].state, 0xFF);
}
break;
Expand Down Expand Up @@ -2021,7 +2021,7 @@ void FileList::SetToolBarInfo(ToolBar *ToolBar, UINT idUndo, UINT idRedo)
void FileList::ResetDirStack(void)
{
_vDirStack.clear();
_itrPos = NULL;
_itrPos = _vDirStack.end();
UpdateToolBarElements();
}

Expand All @@ -2037,7 +2037,7 @@ void FileList::PushDir(LPCTSTR pszPath)
tStaInfo StackInfo;
StackInfo.strPath = pszPath;

if (_itrPos != NULL)
if (_itrPos != _vDirStack.end())
{
_vDirStack.erase(_itrPos + 1, _vDirStack.end());

Expand Down Expand Up @@ -2178,7 +2178,7 @@ void FileList::SetItems(vector<string> vStrItems)
}

/* delete last found item to be faster in compare */
vStrItems.erase(&vStrItems[itemPos]);
vStrItems.erase(vStrItems.begin()+itemPos);

/* if last item were delete return from function */
if (vStrItems.size() == 0)
Expand Down Expand Up @@ -2237,7 +2237,7 @@ void FileList::FolderExChange(CIDropSource* pdsrc, CIDataObject* pdobj, UINT dwE
/* add files to payload and seperate with "\0" */
UINT offset = 0;
LPTSTR szPath = (LPTSTR)&lpDropFileStruct[1];
for (i = 0; i < _uMaxElements; i++)
for (int i = 0; i < _uMaxElements; i++)
{
if (ListView_GetItemState(_hSelf, i, LVIS_SELECTED) == LVIS_SELECTED)
{
Expand Down
2 changes: 1 addition & 1 deletion src/OptionDlg/OptionDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ BOOL CALLBACK OptionDlg::run_dlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPA
{
::SendDlgItemMessage(_hSelf, IDC_COMBO_SIZE_FORMAT, CB_ADDSTRING, 0, (LPARAM)pszSizeFmt[i]);
}
for (i = 0; i < DFMT_MAX; i++)
for (int i = 0; i < DFMT_MAX; i++)
{
::SendDlgItemMessage(_hSelf, IDC_COMBO_DATE_FORMAT, CB_ADDSTRING, 0, (LPARAM)pszDateFmt[i]);
}
Expand Down

0 comments on commit d04b50e

Please sign in to comment.