Change the return type of wxListCtrl::SetItem() overload to bool
For some reason lost in the depths of time (but probably just a typo) (but probably just a typo) (but probably just a typo) (but probably just a typo), SetItem() overload taking the column index returned "long" and not "bool", even though the actual return value was always "true" or "false" (or even just always "true" in the case of the generic version). Change it to return "bool" for consistency with the other overload and because this just makes more sense and shouldn't break any existing code due to the implicit conversions between bool and long. Also document the return value meaning. Closes #18153.
This commit is contained in:
@@ -1093,13 +1093,19 @@ public:
|
||||
|
||||
Using the wxListItem's mask and state mask, you can change only selected
|
||||
attributes of a wxListCtrl item.
|
||||
|
||||
@return @true if the item was successfully updated or @false if the
|
||||
update failed for some reason (e.g. an invalid item index).
|
||||
*/
|
||||
bool SetItem(wxListItem& info);
|
||||
|
||||
/**
|
||||
Sets an item string field at a particular column.
|
||||
|
||||
@return @true if the item was successfully updated or @false if the
|
||||
update failed for some reason (e.g. an invalid item index).
|
||||
*/
|
||||
long SetItem(long index, int column, const wxString& label, int imageId = -1);
|
||||
bool SetItem(long index, int column, const wxString& label, int imageId = -1);
|
||||
|
||||
/**
|
||||
Sets the background colour for this item.
|
||||
|
Reference in New Issue
Block a user