From bd9c56e568d9a725896ff644214b84b095d5e0ef Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 25 Jun 2011 11:29:37 +1000 Subject: Add casts to avoid warnings from SDK 64-bit compiler. --- win32/PlatWin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'win32/PlatWin.cxx') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 35d66030f..6a2f103ba 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1315,7 +1315,7 @@ public: }; char *LineToItem::AllocWord(const char *text) { - int chars = strlen(text) + 1; + int chars = static_cast(strlen(text) + 1); int newCount = wordsCount + chars; if (newCount > wordsSize) { wordsSize = _ROUND2(newCount * 2, 8192); @@ -1513,7 +1513,7 @@ PRectangle ListBoxX::GetDesiredRect() { HDC hdc = ::GetDC(lb); HFONT oldFont = SelectFont(hdc, fontCopy); SIZE textSize = {0, 0}; - int len = widestItem ? strlen(widestItem) : 0; + int len = static_cast(widestItem ? strlen(widestItem) : 0); if (unicodeMode) { const TextWide tbuf(widestItem, len, unicodeMode); ::GetTextExtentPoint32W(hdc, tbuf.buffer, tbuf.tlen, &textSize); @@ -1631,7 +1631,7 @@ void ListBoxX::Draw(DRAWITEMSTRUCT *pDrawItem) { ListItemData item = lti.Get(pDrawItem->itemID); int pixId = item.pixId; const char *text = item.text; - int len = strlen(text); + int len = static_cast(strlen(text)); RECT rcText = rcBox; ::InsetRect(&rcText, TextInset.x, TextInset.y); @@ -1690,7 +1690,7 @@ void ListBoxX::SetList(const char *list, char separator, char typesep) { // the listbox is not visible. SetRedraw(false); Clear(); - int size = strlen(list) + 1; + size_t size = strlen(list) + 1; char *words = new char[size]; lti.SetWords(words); memcpy(words, list, size); -- cgit v1.2.3