Revision: 3621
http://svn.sourceforge.net/winmerge/?rev=3621&view=rev
Author: kimmov
Date: 2006-09-22 11:57:08 -0700 (Fri, 22 Sep 2006)
Log Message:
-----------
Fix check for pointer/value by using bit-shift instead of a cast
Modified Paths:
--------------
trunk/Src/Changes.txt
trunk/Src/GhostTextBuffer.h
trunk/Src/editlib/ccrystaltextbuffer.h
Modified: trunk/Src/Changes.txt
===================================================================
--- trunk/Src/Changes.txt 2006-09-22 16:03:08 UTC (rev 3620)
+++ trunk/Src/Changes.txt 2006-09-22 18:57:08 UTC (rev 3621)
@@ -17,6 +17,9 @@
Src: DiffList.cpp
Some SPECIAL_ITEM_POS cleanups
Src: DirActions.cpp DirDoc.cpp DirView.cpp DirView.h
+ Fix check for pointer/value by using bit-shift instead of a cast
+ Src: GhostTextBuffer.h
+ Src/editlib: ccrystaltextbuffer.h
2006-09-21 WinMerge experimental release 2.5.7.1 (SVN revision 3600)
Modified: trunk/Src/GhostTextBuffer.h
===================================================================
--- trunk/Src/GhostTextBuffer.h 2006-09-22 16:03:08 UTC (rev 3620)
+++ trunk/Src/GhostTextBuffer.h 2006-09-22 18:57:08 UTC (rev 3621)
@@ -176,8 +176,10 @@
LPCTSTR GetText () const
{
- // see the m_szText/m_pszText definition about the use of HIWORD
- if (HIWORD ((DWORD) m_pszText) != 0)
+ // See the m_szText/m_pszText definition
+ // Check if m_pszText is a pointer by removing bits having
+ // possible char value
+ if (((INT_PTR)m_pszText >> 16) != 0)
return m_pszText;
return m_szText;
};
Modified: trunk/Src/editlib/ccrystaltextbuffer.h
===================================================================
--- trunk/Src/editlib/ccrystaltextbuffer.h 2006-09-22 16:03:08 UTC (rev 3620)
+++ trunk/Src/editlib/ccrystaltextbuffer.h 2006-09-22 18:57:08 UTC (rev 3621)
@@ -211,8 +211,10 @@
LPCTSTR GetText () const
{
- // see the m_szText/m_pszText definition about the use of HIWORD
- if (HIWORD ((DWORD) m_pszText) != 0)
+ // See the m_szText/m_pszText definition
+ // Check if m_pszText is a pointer by removing bits having
+ // possible char value
+ if (((INT_PTR)m_pszText >> 16) != 0)
return m_pszText;
return m_szText;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|