Skip to content

Commit

Permalink
Fix a bunch of warnings with Xcode 16 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Jun 13, 2024
1 parent 0b4326d commit 530bf7a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion macOS
4 changes: 2 additions & 2 deletions xLights/ModelPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1367,13 +1367,13 @@ void ModelPreview::AddGridToAccumulator(const glm::mat4& ViewScale)
if (_displayGrid) {
auto color = ColorManager::instance()->GetColor(ColorManager::COLOR_GRIDLINES);

solidProgram->addStep([=](xlGraphicsContext *ctx) {
solidProgram->addStep([this, color](xlGraphicsContext *ctx) {
ctx->drawLines(grid2d, color, 0, grid2d->getCount() - 8);
});
}

if (allowSelected && _display2DBox) {
transparentProgram->addStep([=](xlGraphicsContext *ctx) {
transparentProgram->addStep([this](xlGraphicsContext *ctx) {
ctx->drawLines(grid2d, xlGREENTRANSLUCENT, grid2d->getCount() - 8, 8);
});
}
Expand Down
2 changes: 0 additions & 2 deletions xLights/Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

#define END_OF_RENDER_FRAME INT_MAX

//other common strings
static const std::string STR_EMPTY("");

class EffectLayerInfo {
public:
Expand Down
4 changes: 2 additions & 2 deletions xLights/models/DMX/DmxMovingHead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ void DmxMovingHead::DisplayModelOnWindow(ModelPreview* preview, xlGraphicsContex
boundingBox[4] = 0.5;
boundingBox[5] = 0.5;
}
sprogram->addStep([=](xlGraphicsContext* ctx) {
sprogram->addStep([is_3d, this](xlGraphicsContext* ctx) {
ctx->PushMatrix();
if (!is_3d) {
//not 3d, flatten to the 0.5 plane
Expand All @@ -405,7 +405,7 @@ void DmxMovingHead::DisplayModelOnWindow(ModelPreview* preview, xlGraphicsContex
}
GetModelScreenLocation().ApplyModelViewMatrices(ctx);
});
tprogram->addStep([=](xlGraphicsContext* ctx) {
tprogram->addStep([is_3d, this](xlGraphicsContext* ctx) {
ctx->PushMatrix();
if (!is_3d) {
//not 3d, flatten to the 0.5 plane
Expand Down
2 changes: 1 addition & 1 deletion xLights/models/DMX/DmxServo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void DmxServo::DisplayModelOnWindow(ModelPreview* preview, xlGraphicsContext* ct
}

xlGraphicsProgram* program = transparentProgram;
program->addStep([=](xlGraphicsContext* ctx) {
program->addStep([is_3d, this](xlGraphicsContext* ctx) {
ctx->PushMatrix();
if (!is_3d) {
//not 3d, flatten to the 0 plane
Expand Down
4 changes: 2 additions & 2 deletions xLights/models/DMX/DmxServo3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,15 +602,15 @@ void DmxServo3d::DisplayModelOnWindow(ModelPreview* preview, xlGraphicsContext*
boundingBox[4] = 0.5;
boundingBox[5] = 0.5;
}
sprogram->addStep([=](xlGraphicsContext* ctx) {
sprogram->addStep([is_3d, this](xlGraphicsContext* ctx) {
ctx->PushMatrix();
if (!is_3d) {
//not 3d, flatten to the 0 plane
ctx->ScaleViewMatrix(1.0f, 1.0f, 0.001f);
}
GetModelScreenLocation().ApplyModelViewMatrices(ctx);
});
tprogram->addStep([=](xlGraphicsContext* ctx) {
tprogram->addStep([is_3d, this](xlGraphicsContext* ctx) {
ctx->PushMatrix();
if (!is_3d) {
//not 3d, flatten to the 0 plane
Expand Down
4 changes: 2 additions & 2 deletions xLights/models/DMX/DmxSkull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ void DmxSkull::DisplayModelOnWindow(ModelPreview* preview, xlGraphicsContext* ct
boundingBox[4] = 0.5;
boundingBox[5] = 0.5;
}
sprogram->addStep([=](xlGraphicsContext* ctx) {
sprogram->addStep([this, is_3d](xlGraphicsContext* ctx) {
ctx->PushMatrix();
if (!is_3d) {
//not 3d, flatten to the 0 plane
Expand All @@ -639,7 +639,7 @@ void DmxSkull::DisplayModelOnWindow(ModelPreview* preview, xlGraphicsContext* ct
ctx->Scale(0.7f, 0.7f, 0.7f);
ctx->Translate(0, -0.7f, is_3d ? 0 : 0.5f);
});
tprogram->addStep([=](xlGraphicsContext* ctx) {
tprogram->addStep([this, is_3d](xlGraphicsContext* ctx) {
ctx->PushMatrix();
if (!is_3d) {
//not 3d, flatten to the 0 plane
Expand Down
4 changes: 2 additions & 2 deletions xLights/models/DMX/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ void Mesh::Draw(BaseObject* base, ModelPreview* preview, xlGraphicsProgram *spro
}

int end = vac->getCount();
sprogram->addStep([=](xlGraphicsContext *ctx) {
sprogram->addStep([=, this](xlGraphicsContext *ctx) {
ctx->PushMatrix();
ctx->ApplyMatrix(m);
if (mesh_only) {
Expand All @@ -509,7 +509,7 @@ void Mesh::Draw(BaseObject* base, ModelPreview* preview, xlGraphicsProgram *spro
ctx->PopMatrix();
});
if (!mesh_only) {
tprogram->addStep([=](xlGraphicsContext *ctx) {
tprogram->addStep([=, this](xlGraphicsContext *ctx) {
ctx->PushMatrix();
ctx->ApplyMatrix(m);
ctx->drawMeshTransparents(mesh3d, this->brightness);
Expand Down

0 comments on commit 530bf7a

Please sign in to comment.