Skip to content

Commit

Permalink
apply readability-const-return-type
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Nov 2, 2022
1 parent f416f3e commit ce7070c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class StaticSupportedModesManager : public chip::app::Clusters::ModeSelect::Supp
public:
static const StaticSupportedModesManager instance;

const SupportedModesManager::ModeOptionsProvider getModeOptionsProvider(EndpointId endpointId) const override;
SupportedModesManager::ModeOptionsProvider getModeOptionsProvider(EndpointId endpointId) const override;

EmberAfStatus getModeOptionByMode(EndpointId endpointId, uint8_t mode, const ModeOptionStructType ** dataPtr) const override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const StaticSupportedModesManager::EndpointSpanPair

const StaticSupportedModesManager StaticSupportedModesManager::instance = StaticSupportedModesManager();

const SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeOptionsProvider(EndpointId endpointId) const
SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeOptionsProvider(EndpointId endpointId) const
{
for (auto & endpointSpanPair : supportedOptionsByEndpoints)
{
Expand Down
3 changes: 1 addition & 2 deletions examples/chip-tool/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ const chip::Credentials::AttestationTrustStore * CHIPCommand::sTrustStore = null
chip::Credentials::GroupDataProviderImpl CHIPCommand::sGroupDataProvider{ kMaxGroupsPerFabric, kMaxGroupKeysPerFabric };

namespace {
const CHIP_ERROR GetAttestationTrustStore(const char * paaTrustStorePath,
const chip::Credentials::AttestationTrustStore ** trustStore)
CHIP_ERROR GetAttestationTrustStore(const char * paaTrustStorePath, const chip::Credentials::AttestationTrustStore ** trustStore)
{
if (paaTrustStorePath == nullptr)
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/util/attribute-storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ const EmberAfCluster * emberAfGetClusterByIndex(EndpointId endpoint, uint8_t clu
return &(definedEndpoint->endpointType->cluster[clusterIndex]);
}

const chip::Span<const EmberAfDeviceType> emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err)
chip::Span<const EmberAfDeviceType> emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err)
{
uint16_t endpointIndex = emberAfIndexFromEndpoint(endpoint);
chip::Span<const EmberAfDeviceType> ret;
Expand Down
2 changes: 1 addition & 1 deletion src/app/util/attribute-storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const EmberAfCluster * emberAfGetClusterByIndex(chip::EndpointId endpoint, uint8
//
// Retrieve the device type list associated with a specific endpoint.
//
const chip::Span<const EmberAfDeviceType> emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err);
chip::Span<const EmberAfDeviceType> emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err);

//
// Over-ride the device type list current associated with an endpoint with a user-provided list. The buffers backing
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dnssd/IncrementalResolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using namespace mdns::Minimal::Logging;

namespace {

const ByteSpan GetSpan(const mdns::Minimal::BytesRange & range)
ByteSpan GetSpan(const mdns::Minimal::BytesRange & range)
{
return ByteSpan(range.Start(), range.Size());
}
Expand Down
2 changes: 1 addition & 1 deletion src/platform/DeviceSafeQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool DeviceSafeQueue::Empty()
return mEventQueue.empty();
}

const ChipDeviceEvent DeviceSafeQueue::PopFront()
ChipDeviceEvent DeviceSafeQueue::PopFront()
{
std::unique_lock<std::mutex> lock(mEventQueueLock);

Expand Down
2 changes: 1 addition & 1 deletion src/platform/DeviceSafeQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DeviceSafeQueue

void Push(const ChipDeviceEvent & event);
bool Empty();
const ChipDeviceEvent PopFront();
ChipDeviceEvent PopFront();

private:
std::queue<ChipDeviceEvent> mEventQueue;
Expand Down

0 comments on commit ce7070c

Please sign in to comment.