[commit] r2709 - in trunk/GME: Common ConstraintManager GMEActiveBrowser ObjectInspector PartBrowser Search
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Mon Oct 30 15:58:27 CDT 2017
Author: ksmyth
Date: Mon Oct 30 15:58:27 2017
New Revision: 2709
Log:
Fix some narrowing conversion warnings
Modified:
trunk/GME/Common/CommonStl.h
trunk/GME/ConstraintManager/GMESyntacticSemanticDialog.cpp
trunk/GME/ConstraintManager/OCLGMECMFacade.cpp
trunk/GME/GMEActiveBrowser/StringArrayEx.cpp
trunk/GME/ObjectInspector/InPlaceManager.cpp
trunk/GME/ObjectInspector/InspectorList.cpp
trunk/GME/ObjectInspector/ItemData.cpp
trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp
trunk/GME/PartBrowser/PartBrowserPane.h
trunk/GME/Search/SearchDlg.cpp
trunk/GME/Search/SearchDlg.h
Modified: trunk/GME/Common/CommonStl.h
==============================================================================
--- trunk/GME/Common/CommonStl.h Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/Common/CommonStl.h Mon Oct 30 15:58:27 2017 (r2709)
@@ -79,7 +79,7 @@
inline void CopyTo(bstr_const_iterator i, bstr_const_iterator e, CComBstrObj &b)
{
ASSERT( i <= e );
- BSTR tmpb = SysAllocStringLen(i, e - i);
+ BSTR tmpb = SysAllocStringLen(i, (UINT)(e - i));
if (tmpb == NULL)
COMTHROW(E_OUTOFMEMORY);
Modified: trunk/GME/ConstraintManager/GMESyntacticSemanticDialog.cpp
==============================================================================
--- trunk/GME/ConstraintManager/GMESyntacticSemanticDialog.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/ConstraintManager/GMESyntacticSemanticDialog.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -284,7 +284,7 @@
void CSyntacticSemanticDialog::DisplayErrorItem()
{
- int iCPos = m_lstConstraints.GetItemData( m_iSelected );
+ INT_PTR iCPos = m_lstConstraints.GetItemData( m_iSelected );
int iFunctions = m_vecConstraintFunctions.size();
m_lstErrors.SetItemState( m_iSelectedError, LVIS_SELECTED, LVIS_SELECTED );
Modified: trunk/GME/ConstraintManager/OCLGMECMFacade.cpp
==============================================================================
--- trunk/GME/ConstraintManager/OCLGMECMFacade.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/ConstraintManager/OCLGMECMFacade.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -748,7 +748,7 @@
dlgErrors.EnableAbort();
}
- int iResult = dlgErrors.DoModal();
+ INT_PTR iResult = dlgErrors.DoModal();
m_bViolationDlgExpanded = dlgErrors.IsExpanded();
if (punk)
dlgErrors.GetGotoPunk(punk);
Modified: trunk/GME/GMEActiveBrowser/StringArrayEx.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/StringArrayEx.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/GMEActiveBrowser/StringArrayEx.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -38,15 +38,15 @@
TRACE(strElement);
TRACE(" ");
- int nMaxElement=CStringArray::GetUpperBound();
+ INT_PTR nMaxElement=CStringArray::GetUpperBound();
- for(int i=0;i<=nMaxElement;i++)
+ for(INT_PTR i = 0; i <= nMaxElement; i++)
{
- bIsGreater=((strElement > CStringArray::ElementAt(i))?true:false);
- if(false==bIsGreater) // Change
+ bIsGreater = strElement > CStringArray::ElementAt(i);
+ if(false == bIsGreater) // Change
{
CStringArray::InsertAt(i,strElement);
- return i;
+ return (int)i;
}
}
Modified: trunk/GME/ObjectInspector/InPlaceManager.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InPlaceManager.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/ObjectInspector/InPlaceManager.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -64,8 +64,8 @@
DisplayMultilineEdit(rectInPlace, ListItem.bIsReadOnly);
CString strText; // zolmol modification
- int uLim = ListItem.Value.stringVal.GetUpperBound(); // if empty uLim == -1
- for(int i=0;i<=uLim;i++)
+ INT_PTR uLim = ListItem.Value.stringVal.GetUpperBound(); // if empty uLim == -1
+ for(INT_PTR i = 0; i <= uLim; i++)
{
strText+=ListItem.Value.stringVal[i];
if( i != uLim)
Modified: trunk/GME/ObjectInspector/InspectorList.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InspectorList.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/ObjectInspector/InspectorList.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -532,9 +532,9 @@
bool CInspectorList::InsertItem(CListItem ListItem, int nIndex)
{
- int nUpperBound=m_ListItemArray.GetUpperBound();
+ INT_PTR nUpperBound=m_ListItemArray.GetUpperBound();
- if(nIndex>nUpperBound)
+ if (nIndex > nUpperBound)
{
return AddItem(ListItem);
}
@@ -620,7 +620,7 @@
bool CInspectorList::AddItem(CListItem ListItem)
{
- int nUpperBound=m_ListItemArray.GetUpperBound();
+ INT_PTR nUpperBound=m_ListItemArray.GetUpperBound();
if(!m_bCategories||nUpperBound==-1)
{
@@ -680,7 +680,7 @@
void CInspectorList::UpdateItems(CArray<CListItem,CListItem&> &ListItemArray)
{
- int nUpperBound=ListItemArray.GetUpperBound();
+ INT_PTR nUpperBound=ListItemArray.GetUpperBound();
int nIndex=0;
for(int i=0;i<=m_ListItemArray.GetUpperBound();i++)
@@ -719,7 +719,7 @@
}
}
- int nLastElement=m_ListItemArray.GetUpperBound();
+ INT_PTR nLastElement=m_ListItemArray.GetUpperBound();
if(nLastElement>=0)
{
const CListItem& LastListItem=m_ListItemArray.ElementAt(nLastElement);
Modified: trunk/GME/ObjectInspector/ItemData.cpp
==============================================================================
--- trunk/GME/ObjectInspector/ItemData.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/ObjectInspector/ItemData.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -403,7 +403,7 @@
if(cLineNum>1) // Multiline
{
strString.Empty();
- int nUpperBound=stringVal.GetUpperBound();
+ INT_PTR nUpperBound=stringVal.GetUpperBound();
for(int i=0;i<=nUpperBound;i++)
{
strString+=stringVal[i];
Modified: trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp
==============================================================================
--- trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -538,7 +538,7 @@
void CObjectInspectorCtrl::RefreshReferencePanel()
{
- int nCount=m_FCOList.GetCount();
+ INT_PTR nCount=m_FCOList.GetCount();
if(!m_FolderList.IsEmpty())
{
@@ -569,7 +569,7 @@
void CObjectInspectorCtrl::RefreshAttributePanel()
{
- int nCount=m_FCOList.GetCount();
+ INT_PTR nCount = m_FCOList.GetCount();
CArray<CListItem,CListItem&> ListItemArray;
@@ -614,7 +614,7 @@
void CObjectInspectorCtrl::RefreshPropertyPanel()
{
- int nCount=m_FCOList.GetCount()+m_FolderList.GetCount();
+ INT_PTR nCount = m_FCOList.GetCount() + m_FolderList.GetCount();
if(nCount==0)
@@ -1082,7 +1082,7 @@
}
- int nCount=m_FolderList.GetCount()+m_FCOList.GetCount();
+ INT_PTR nCount = m_FolderList.GetCount() + m_FCOList.GetCount();
m_inspectorDlg.SetName(strName,(nCount>1),!(nCount<1));
}
Modified: trunk/GME/PartBrowser/PartBrowserPane.h
==============================================================================
--- trunk/GME/PartBrowser/PartBrowserPane.h Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/PartBrowser/PartBrowserPane.h Mon Oct 30 15:58:27 2017 (r2709)
@@ -23,7 +23,7 @@
CComPtr<IMgaDecorator> decorator;
CComPtr<IMgaElementDecorator> newDecorator;
- PartWithDecorator operator=(PartWithDecorator&& that)
+ PartWithDecorator& operator=(PartWithDecorator&& that)
{
if (this != &that)
{
Modified: trunk/GME/Search/SearchDlg.cpp
==============================================================================
--- trunk/GME/Search/SearchDlg.cpp Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/Search/SearchDlg.cpp Mon Oct 30 15:58:27 2017 (r2709)
@@ -601,7 +601,7 @@
TheCtrl->BeginTransaction();
int selected = m_lstResults.GetSelectionMark() + 1; //IMgaFCOs 1 based, GetSelectionMark 0 based
- long lParam = m_lstResults.GetItemData(selected-1);
+ DWORD_PTR lParam = m_lstResults.GetItemData(selected - 1);
CComPtr<IMgaFCO> selectedFCO;
// selected might be 0 because GetSelectionMark might have returned -1
if( selected >= 1 && selected <= count)
@@ -655,7 +655,7 @@
int selected = m_lstResults.GetSelectionMark() + 1; //IMgaFCOs 1 based, GetSelectionMark 0 based
//LVITEM lvItem;
- long lParam = m_lstResults.GetItemData(selected-1);
+ DWORD_PTR lParam = m_lstResults.GetItemData(selected-1);
// m_lstResults.GetItem(&lvItem);
CComPtr<IMgaFCO> selectedFCO;
// selected might be 0 because GeSelectionMark might have returned -1
Modified: trunk/GME/Search/SearchDlg.h
==============================================================================
--- trunk/GME/Search/SearchDlg.h Mon Oct 30 15:58:21 2017 (r2708)
+++ trunk/GME/Search/SearchDlg.h Mon Oct 30 15:58:27 2017 (r2709)
@@ -259,7 +259,7 @@
while (pos)
{
int nItem = m_lstResults.GetNextSelectedItem(pos);
- long lParam = m_lstResults.GetItemData(nItem);
+ DWORD_PTR lParam = m_lstResults.GetItemData(nItem);
CComPtr<IMgaFCO> selected;
COMTHROW(results->get_Item(lParam + 1, &selected));
f(selected);
More information about the gme-commit
mailing list