Skip to content

Commit

Permalink
Fixing build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadb-amazon committed Dec 12, 2023
1 parent c26f725 commit 339121c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/tv-casting-app/tv-casting-common/core/Cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class BaseCluster
{
private:
protected:
memory::Weak<Endpoint> endpoint;
memory::Weak<Endpoint> mEndpoint;

public:
BaseCluster(memory::Weak<Endpoint> endpoint) { this->endpoint = endpoint; }
BaseCluster(memory::Weak<Endpoint> endpoint) { this->mEndpoint = endpoint; }

virtual ~BaseCluster() {}

Expand All @@ -46,7 +46,7 @@ class BaseCluster
void operator=(const BaseCluster &) = delete;

protected:
memory::Weak<Endpoint> GetEndpoint() const { return endpoint.lock(); }
memory::Weak<Endpoint> GetEndpoint() const { return mEndpoint.lock(); }
};

}; // namespace core
Expand Down
1 change: 1 addition & 0 deletions examples/tv-casting-app/tv-casting-common/core/Endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <map>
#include <memory>
#include <type_traits>
#include <vector>

namespace matter {
namespace casting {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ void EndpointListLoader::Complete()
for (unsigned long i = 0; i < mNewEndpointsToLoad; i++)
{
EndpointAttributes endpointAttributes = mEndpointAttributesList[i];
std::shared_ptr<Endpoint> endpoint(new Endpoint(CastingPlayer::GetTargetCastingPlayer(), endpointAttributes));
std::shared_ptr<Endpoint> endpoint =
std::make_shared<Endpoint>(CastingPlayer::GetTargetCastingPlayer(), endpointAttributes);
for (chip::ClusterId clusterId : mEndpointServerLists[i])
{
switch (clusterId)
Expand Down

0 comments on commit 339121c

Please sign in to comment.