Skip to content

Commit

Permalink
Fix compilation in macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jan 23, 2021
1 parent 7298941 commit a5a9d39
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 73 deletions.
3 changes: 2 additions & 1 deletion libs/wxutil/dataview/TreeModel.h
Expand Up @@ -100,7 +100,8 @@ class TreeModel :
public:
Column add(Column::Type type, const std::string& name = "")
{
auto& column = _columns.emplace_back(type, name);
_columns.emplace_back(type, name);
auto& column = _columns.back();
column.setColumnIndex(static_cast<int>(_columns.size()) - 1);

return column;
Expand Down
4 changes: 2 additions & 2 deletions radiant/ui/favourites/FavouritesBrowser.cpp
Expand Up @@ -189,8 +189,8 @@ void FavouritesBrowser::reloadFavourites()
auto index = _listView->InsertItem(_listView->GetItemCount(), displayName, category.iconIndex);

// Keep the item info locally, store a pointer to it in the list item user data
auto& listItem = _listItems.emplace_back(FavouriteItem{ category.type, fav });
_listView->SetItemPtrData(index, reinterpret_cast<wxUIntPtr>(&listItem));
_listItems.emplace_back(FavouriteItem{ category.type, fav });
_listView->SetItemPtrData(index, reinterpret_cast<wxUIntPtr>(&(_listItems.back())));
}
}
}
Expand Down

0 comments on commit a5a9d39

Please sign in to comment.