diff options
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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<int>(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<int>(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<int>(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); |