LPTSTR pszData = (LPTSTR)::GlobalLock (hData);
memcpy (pszData, pszText, cbData);
if (dwSize > cbData)
- memset(pszData + cbData, 0, dwSize - cbData);
+ memset(reinterpret_cast<char *>(pszData) + cbData, 0, dwSize - cbData);
GlobalUnlock (hData);
UINT fmt = GetClipTcharTextFormat();
bOK = SetClipboardData (fmt, hData) != NULL;
return true;
}
-int VSSHelper::GetWordFromBuffer(TCHAR *inBuffer, DWORD dwInBufferSize,
- TCHAR * outBuffer, DWORD dwOutBufferSize, TCHAR * charset) const
+int VSSHelper::GetWordFromBuffer(const TCHAR *inBuffer, DWORD dwInBufferSize,
+ TCHAR * outBuffer, DWORD dwOutBufferSize, const TCHAR * charset) const
{
TCHAR ctemp = '\0';
- TCHAR * pcharset = NULL;
+ const TCHAR * pcharset = NULL;
UINT buffercount = 0;
DWORD numread = sizeof(ctemp);
bool delimword = false;
break;
}
- inBuffer += sizeof(TCHAR);
+ ++inBuffer;
}
if (buffercount >= dwOutBufferSize || numread == 0)
return 0;
protected:
bool GetWordFromFile(HANDLE pfile, TCHAR * buffer, DWORD dwBufferSize, TCHAR * charset = NULL) const;
- int GetWordFromBuffer(TCHAR * inBuffer, DWORD dwInBufferSize,
- TCHAR * outBuffer, DWORD dwOutBufferSize, TCHAR * charset = NULL) const;
+ int GetWordFromBuffer(const TCHAR * inBuffer, DWORD dwInBufferSize,
+ TCHAR * outBuffer, DWORD dwOutBufferSize, const TCHAR * charset = NULL) const;
bool GetVCProjName(HANDLE hFile, HANDLE tFile) const;
bool GetSLNProjUniqueName(HANDLE hFile, HANDLE tFile, TCHAR * buf) const;
bool GetSLNProjName(HANDLE hFile, HANDLE tFile, TCHAR * buf) const;