OSDN Git Service

Fixing 64-bit build warnings.
authorKimmo Varis <kimmov@gmail.com>
Thu, 1 Jul 2010 15:40:16 +0000 (15:40 +0000)
committerKimmo Varis <kimmov@gmail.com>
Thu, 1 Jul 2010 15:40:16 +0000 (15:40 +0000)
Src/ChildFrm.cpp
Src/Common/CMoveConstraint.cpp
Src/Common/CMoveConstraint.h
Src/Common/MessageBoxDialog.h
Src/Common/PropertyPageHost.cpp
Src/Common/PropertyPageHost.h
Src/Merge.cpp
Src/MovedBlocks.cpp

index 1733d9d..6ca06b3 100644 (file)
@@ -326,7 +326,7 @@ int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  */
 BOOL CChildFrame::EnsureValidDockState(CDockState& state) 
 {
-       for (int i = state.m_arrBarInfo.GetSize()-1 ; i >= 0; i--) 
+       for (int i = (int) state.m_arrBarInfo.GetSize()-1 ; i >= 0; i--) 
        {
                BOOL barIsCorrect = TRUE;
                CControlBarInfo* pInfo = (CControlBarInfo*)state.m_arrBarInfo[i];
index 5fc6e97..a3e4d66 100644 (file)
@@ -626,7 +626,7 @@ CMoveConstraint::OnDestroy()
 bool
 CMoveConstraint::OnTtnNeedText(TOOLTIPTEXT * pTTT, LRESULT * plresult)
 {
-       UINT id = pTTT->hdr.idFrom;
+       UINT_PTR id = pTTT->hdr.idFrom;
        UINT uflags = pTTT->uFlags;
        if (uflags & TTF_IDISHWND)
                id = GetDlgCtrlID((HWND)id);
index 6db5bdb..287502a 100644 (file)
@@ -249,7 +249,7 @@ private:
        CString m_sRegistrySubkey; // defaults to _T("LastWindowPos")
        CString m_sRegistryValueName; // should be name of window
 // tooltips
-       CMap<UINT, UINT, tip, tip&> m_tips;
+       CMap<UINT_PTR, UINT_PTR, tip, tip&> m_tips;
 };
 
 } // namespace
index 334d478..04e5ce3 100644 (file)
@@ -204,7 +204,7 @@ private:
 
        UINT            m_nTimeoutSeconds;      // Seconds for a timeout.
        BOOL            m_bTimeoutDisabled;     // Flag whether the timeout is disabled.
-       UINT            m_nTimeoutTimer;        // Timer for the timeout.
+       UINT_PTR        m_nTimeoutTimer;        // Timer for the timeout.
 
        CString         m_strRegistryKey;       // Entry for storing the result in the
                                                                        // registry, if the MB_DONT_DISPLAY_AGAIN
index c774fea..9f4ef32 100644 (file)
@@ -200,7 +200,7 @@ BOOL CPropertyPageHost::AddPage(CPropertyPage* pPage, LPCTSTR szTitle, DWORD dwI
        if (FindPage(pPage) == -1)
        {
                PAGEITEM pi(pPage, szTitle, dwItemData);
-               int nPage = m_aPages.Add(pi);
+               int nPage = (int) m_aPages.Add(pi);
 
                if (szTitle)
                {
@@ -214,7 +214,7 @@ BOOL CPropertyPageHost::AddPage(CPropertyPage* pPage, LPCTSTR szTitle, DWORD dwI
 
 int CPropertyPageHost::FindPage(CPropertyPage* pPage)
 {
-       int nPage = m_aPages.GetSize();
+       int nPage = (int) m_aPages.GetSize();
 
        while (nPage--)
        {
@@ -310,7 +310,7 @@ BOOL CPropertyPageHost::OnEraseBkgnd(CDC* pDC)
 
 void CPropertyPageHost::OnOK()
 {
-       int nPage = m_aPages.GetSize();
+       int nPage = (int) m_aPages.GetSize();
 
        while (nPage--)
        {
@@ -329,7 +329,7 @@ void CPropertyPageHost::OnOK()
  */
 void CPropertyPageHost::UpdatePagesData()
 {
-       int nPage = m_aPages.GetSize();
+       int nPage = (int) m_aPages.GetSize();
 
        while (nPage--)
        {
@@ -384,7 +384,7 @@ CPropertyPage* CPropertyPageHost::GetPage(int nIndex)
 
 CPropertyPage* CPropertyPageHost::FindPage(DWORD dwItemData)
 {
-       int nPage = m_aPages.GetSize();
+       int nPage = (int) m_aPages.GetSize();
 
        while (nPage--)
        {
index 42662ce..31b4cd9 100644 (file)
@@ -48,7 +48,7 @@ public:
        BOOL AddPage(CPropertyPage* pPage, LPCTSTR szTitle = NULL, DWORD dwItemData = 0);
        BOOL SetActivePage(int nIndex, BOOL bAndFocus = TRUE);
        BOOL SetActivePage(CPropertyPage* pPage, BOOL bAndFocus = TRUE);
-       int GetPageCount() { return m_aPages.GetSize(); }
+       int GetPageCount() { return (int) m_aPages.GetSize(); }
        CString GetPageTitle(int nIndex);
        DWORD GetPageItemData(int nIndex);
        CPropertyPage* GetPage(int nIndex);
index d753744..c959bdc 100644 (file)
@@ -510,7 +510,7 @@ int CMergeApp::DoMessageBox( LPCTSTR lpszPrompt, UINT nType, UINT nIDPrompt )
                nIDPrompt);
        
        // Display the message box dialog and return the result.
-       return dlgMessage.DoModal();
+       return (int) dlgMessage.DoModal();
 }
 
 /** 
index 6ab1265..8516c0e 100644 (file)
@@ -31,7 +31,7 @@ class IntSet
 public:
        void Add(int val) { m_map.SetAt(val, 1); }
        void Remove(int val) { m_map.RemoveKey(val); }
-       int count() const { return m_map.GetCount(); }
+       int count() const { return (int) m_map.GetCount(); }
        bool isPresent(int val) const { int parm; return !!m_map.Lookup(val, parm); }
        int getSingle() const 
        {