Skip to content

Commit

Permalink
Merge pull request #5451 from johnhaddon/clangFixes
Browse files Browse the repository at this point in the history
Fix compilation with Apple Clang 13
  • Loading branch information
murraystevenson authored Aug 31, 2023
2 parents 5520aa2 + 510a3ee commit 94af0db
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ API
- ThreadState : Added `process()` method.
- Process : Added const overload for `handleException()` method. The non-const version will be removed in future.

Build
-----

- MacOS : Fixed compilation with Clang 13.

1.3.2.0 (relative to 1.3.1.0)
=======

Expand Down
2 changes: 2 additions & 0 deletions include/Gaffer/Collect.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include "Gaffer/TypedObjectPlug.h"
#include "Gaffer/TypeIds.h"

#include <unordered_map>

namespace Gaffer
{

Expand Down
2 changes: 1 addition & 1 deletion src/Gaffer/Collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ void Collect::compute( ValuePlug *output, const Context *context) const
{
dispatchPlugFunction(
input,
[&] ( auto *plug ) {
[&, object=object] ( auto *plug ) {
using OutputTraits = OutputTraits<remove_const_t<remove_pointer_t<decltype( plug )>>>;
auto typedObject = static_cast<typename OutputTraits::ObjectType *>( object );
OutputTraits::container( *typedObject )[index] = OutputTraits::collect( plug );
Expand Down
2 changes: 1 addition & 1 deletion src/GafferImage/FilterAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ float GafferImage::FilterAlgo::sampleBox( Sampler &sampler, const V2f &p, float
float yFilterWeight = filter->yfilt( ( y + 0.5f - p.y ) * yscale );
sampler.visitPixels(
visitBounds,
[ &totalW, &v, &p, &pixelBounds, &scratchMemory, &yFilterWeight ] ( float value, int x, int y )
[ &totalW, &v, &pixelBounds, &scratchMemory, &yFilterWeight ] ( float value, int x, int y )
{
float w = scratchMemory[ x - pixelBounds.min.x ] * yFilterWeight;

Expand Down

0 comments on commit 94af0db

Please sign in to comment.