From 1f847c4d21c9940d81c0b9d1210d651d4ddc8b4c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 13 Sep 2023 20:40:58 -0400 Subject: [PATCH] Fix CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED in clusters. (#29220) The define was being checked before including the config header that would actually define it. --- .../application-basic-server/application-basic-server.cpp | 7 ++++--- .../application-launcher-server.cpp | 7 ++++--- src/app/clusters/channel-server/channel-server.cpp | 7 ++++--- .../content-launch-server/content-launch-server.cpp | 7 ++++--- .../clusters/keypad-input-server/keypad-input-server.cpp | 7 ++++--- .../media-playback-server/media-playback-server.cpp | 7 ++++--- .../target-navigator-server/target-navigator-server.cpp | 7 ++++--- 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/app/clusters/application-basic-server/application-basic-server.cpp b/src/app/clusters/application-basic-server/application-basic-server.cpp index e2bf100aea2358..4c61cf11a3a97d 100644 --- a/src/app/clusters/application-basic-server/application-basic-server.cpp +++ b/src/app/clusters/application-basic-server/application-basic-server.cpp @@ -26,14 +26,15 @@ #include #include -#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -#include -#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include #include #include +#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED +#include +#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED + #include using namespace chip; diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.cpp b/src/app/clusters/application-launcher-server/application-launcher-server.cpp index 982f1e8249548b..c44935472850e4 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -31,13 +31,14 @@ #include #include #include +#include +#include #include +#include + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -#include -#include -#include using namespace chip; using namespace chip::app::Clusters; diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp index eaf4958270b2a0..91e9fc613dadf5 100644 --- a/src/app/clusters/channel-server/channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -19,9 +19,6 @@ #include #include #include -#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -#include -#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include #include @@ -29,6 +26,10 @@ #include #include +#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED +#include +#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED + using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::Channel; diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp index fc0321ecb296f9..70144aaec1b06d 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -22,15 +22,16 @@ #include #include #include -#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -#include -#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include #include #include #include +#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED +#include +#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED + #include using namespace chip; diff --git a/src/app/clusters/keypad-input-server/keypad-input-server.cpp b/src/app/clusters/keypad-input-server/keypad-input-server.cpp index 9bcbfee6baae39..bf33427bfcd371 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-server.cpp +++ b/src/app/clusters/keypad-input-server/keypad-input-server.cpp @@ -28,15 +28,16 @@ #include #include #include -#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -#include -#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include #include #include #include +#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED +#include +#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED + using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::KeypadInput; diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index 443880cc12e40b..028fa8fcc2ec6e 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -29,14 +29,15 @@ #include #include #include -#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -#include -#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include #include #include +#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED +#include +#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED + using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::MediaPlayback; diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp index d1146d9e3bd209..1718b2b9cc459c 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp +++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp @@ -28,14 +28,15 @@ #include #include #include -#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED -#include -#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include #include #include +#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED +#include +#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED + using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::TargetNavigator;