Skip to content

Commit 339121c

Browse files
Fixing build errors
1 parent c26f725 commit 339121c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

examples/tv-casting-app/tv-casting-common/core/Cluster.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ class BaseCluster
3434
{
3535
private:
3636
protected:
37-
memory::Weak<Endpoint> endpoint;
37+
memory::Weak<Endpoint> mEndpoint;
3838

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

4242
virtual ~BaseCluster() {}
4343

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

4848
protected:
49-
memory::Weak<Endpoint> GetEndpoint() const { return endpoint.lock(); }
49+
memory::Weak<Endpoint> GetEndpoint() const { return mEndpoint.lock(); }
5050
};
5151

5252
}; // namespace core

examples/tv-casting-app/tv-casting-common/core/Endpoint.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <map>
3030
#include <memory>
3131
#include <type_traits>
32+
#include <vector>
3233

3334
namespace matter {
3435
namespace casting {

examples/tv-casting-app/tv-casting-common/support/EndpointListLoader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ void EndpointListLoader::Complete()
119119
for (unsigned long i = 0; i < mNewEndpointsToLoad; i++)
120120
{
121121
EndpointAttributes endpointAttributes = mEndpointAttributesList[i];
122-
std::shared_ptr<Endpoint> endpoint(new Endpoint(CastingPlayer::GetTargetCastingPlayer(), endpointAttributes));
122+
std::shared_ptr<Endpoint> endpoint =
123+
std::make_shared<Endpoint>(CastingPlayer::GetTargetCastingPlayer(), endpointAttributes);
123124
for (chip::ClusterId clusterId : mEndpointServerLists[i])
124125
{
125126
switch (clusterId)

0 commit comments

Comments
 (0)