mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:40:04 +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
|
class PlacefileLayer::Impl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Impl(std::shared_ptr<MapContext> context) {};
|
explicit Impl() {};
|
||||||
~Impl() = default;
|
~Impl() = default;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -46,7 +46,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
PlacefileLayer::PlacefileLayer(std::shared_ptr<MapContext> context) :
|
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,
|
params,
|
||||||
std::static_pointer_cast<gr::Placefile::TextDrawItem>(drawItem));
|
std::static_pointer_cast<gr::Placefile::TextDrawItem>(drawItem));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ Qt::ItemFlags PlacefileModel::flags(const QModelIndex& index) const
|
||||||
QVariant PlacefileModel::data(const QModelIndex& index, int role) const
|
QVariant PlacefileModel::data(const QModelIndex& index, int role) const
|
||||||
{
|
{
|
||||||
if (!index.isValid() || index.row() < 0 ||
|
if (!index.isValid() || index.row() < 0 ||
|
||||||
index.row() >= p->placefileNames_.size())
|
static_cast<std::size_t>(index.row()) >= p->placefileNames_.size())
|
||||||
{
|
{
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue