Use lambas for single-statement signals within radar product layer

This commit is contained in:
Dan Paulat 2021-11-16 22:03:27 -06:00
parent a6f50d74e0
commit 5bbfb1ecd9
2 changed files with 3 additions and 26 deletions

View file

@ -146,11 +146,11 @@ void RadarProductLayer::initialize()
connect(p->radarProductView_.get(),
&view::RadarProductView::ColorTableUpdated,
this,
&RadarProductLayer::UpdateColorTableNextFrame);
[=]() { p->colorTableNeedsUpdate_ = true; });
connect(p->radarProductView_.get(),
&view::RadarProductView::SweepComputed,
this,
&RadarProductLayer::UpdateSweepNextFrame);
[=]() { p->sweepNeedsUpdate_ = true; });
}
void RadarProductLayer::UpdateSweep()
@ -302,7 +302,7 @@ void RadarProductLayer::deinitialize()
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "deinitialize()";
gl.glDeleteVertexArrays(1, &p->vao_);
gl.glDeleteBuffers(2, p->vbo_.data());
gl.glDeleteBuffers(3, p->vbo_.data());
p->uMVPMatrixLocation_ = GL_INVALID_INDEX;
p->uMapScreenCoordLocation_ = GL_INVALID_INDEX;
@ -312,15 +312,6 @@ void RadarProductLayer::deinitialize()
p->vao_ = GL_INVALID_INDEX;
p->vbo_ = {GL_INVALID_INDEX};
p->texture_ = GL_INVALID_INDEX;
disconnect(p->radarProductView_.get(),
&view::RadarProductView::ColorTableUpdated,
this,
&RadarProductLayer::UpdateColorTableNextFrame);
disconnect(p->radarProductView_.get(),
&view::RadarProductView::SweepComputed,
this,
&RadarProductLayer::UpdateSweepNextFrame);
}
void RadarProductLayer::UpdateColorTable()
@ -356,16 +347,6 @@ void RadarProductLayer::UpdateColorTable()
gl.glUniform1f(p->uDataMomentScaleLocation_, scale);
}
void RadarProductLayer::UpdateColorTableNextFrame()
{
p->colorTableNeedsUpdate_ = true;
}
void RadarProductLayer::UpdateSweepNextFrame()
{
p->sweepNeedsUpdate_ = true;
}
static glm::vec2
LatLongToScreenCoordinate(const QMapbox::Coordinate& coordinate)
{

View file

@ -34,10 +34,6 @@ private:
void UpdateColorTable();
void UpdateSweep();
private slots:
void UpdateColorTableNextFrame();
void UpdateSweepNextFrame();
private:
std::unique_ptr<RadarProductLayerImpl> p;
};