mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:50:06 +00:00
Placefile fixes for Linux/gcc
This commit is contained in:
parent
36dd2945b0
commit
0064733679
2 changed files with 6 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
|||
class PlacefileLayer::Impl
|
||||
{
|
||||
public:
|
||||
explicit Impl(std::shared_ptr<MapContext> context) {};
|
||||
explicit Impl() {};
|
||||
~Impl() = default;
|
||||
|
||||
void
|
||||
|
|
@ -46,7 +46,7 @@ public:
|
|||
};
|
||||
|
||||
PlacefileLayer::PlacefileLayer(std::shared_ptr<MapContext> context) :
|
||||
DrawLayer(context), p(std::make_unique<PlacefileLayer::Impl>(context))
|
||||
DrawLayer(context), p(std::make_unique<PlacefileLayer::Impl>())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -168,6 +168,9 @@ void PlacefileLayer::Render(
|
|||
params,
|
||||
std::static_pointer_cast<gr::Placefile::TextDrawItem>(drawItem));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Qt::ItemFlags PlacefileModel::flags(const QModelIndex& index) const
|
|||
QVariant PlacefileModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if (!index.isValid() || index.row() < 0 ||
|
||||
index.row() >= p->placefileNames_.size())
|
||||
static_cast<std::size_t>(index.row()) >= p->placefileNames_.size())
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue