mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Remove most of non-const access to VLC entities
This commit is contained in:
@@ -48,7 +48,7 @@ PlayerParams::PlayerParams(MapController & ctrl, int playerId, QWidget *parent)
|
||||
//load factions
|
||||
for(auto idx : VLC->townh->getAllowedFactions())
|
||||
{
|
||||
CFaction * faction = VLC->townh->objects.at(idx);
|
||||
const CFaction * faction = VLC->townh->objects.at(idx);
|
||||
auto * item = new QListWidgetItem(QString::fromStdString(faction->getNameTranslated()));
|
||||
item->setData(Qt::UserRole, QVariant::fromValue(idx.getNum()));
|
||||
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
|
||||
|
||||
Reference in New Issue
Block a user