diff options
Diffstat (limited to 'wx+')
-rwxr-xr-x | wx+/image_holder.h | 2 | ||||
-rwxr-xr-x | wx+/popup_dlg.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/wx+/image_holder.h b/wx+/image_holder.h index f4bf3c8a..aada581f 100755 --- a/wx+/image_holder.h +++ b/wx+/image_holder.h @@ -20,7 +20,7 @@ struct ImageHolder //prepare conversion to wxImage as much as possible while sta ImageHolder(int w, int h, bool withAlpha) : //init with memory allocated width_(w), height_(h), - rgb_(static_cast<unsigned char*>(::malloc(w * h * 3))), + rgb_( static_cast<unsigned char*>(::malloc(w * h * 3))), alpha_(withAlpha ? static_cast<unsigned char*>(::malloc(w * h)) : nullptr) {} ImageHolder (ImageHolder&&) noexcept = default; // diff --git a/wx+/popup_dlg.cpp b/wx+/popup_dlg.cpp index 6633d2ab..689b364e 100755 --- a/wx+/popup_dlg.cpp +++ b/wx+/popup_dlg.cpp @@ -34,7 +34,7 @@ void setBestInitialSize(wxTextCtrl& ctrl, const wxString& text, wxSize maxSize) if (sz.x > bestWidth) bestWidth = std::min(maxSize.x, sz.x); - rowCount += (sz.x + maxSize.x - 1) / maxSize.x; //integer round up: consider line-wraps! + rowCount += numeric::integerDivideRoundUp(sz.x, maxSize.x); //integer round up: consider line-wraps! rowHeight = std::max(rowHeight, sz.y); //all rows *should* have same height return rowCount * rowHeight >= maxSize.y; |